home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / gfx / 3d / irit50src.lha / irit5 / docs / prog_man.tex < prev    next >
LaTeX Document  |  1995-02-19  |  19.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% TrID LaTeX 2e document (with rem) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 0a 25 20 70 72 6f | 67 5f 6d 61 6e 2e 74 65 |% .% pro|g_man.te|
|00000010| 78 20 2d 20 54 68 65 20 | 49 52 49 54 20 70 72 6f |x - The |IRIT pro|
|00000020| 67 72 61 6d 6d 65 72 27 | 73 20 6d 61 6e 75 61 6c |grammer'|s manual|
|00000030| 20 2d 20 6d 61 69 6e 20 | 6d 6f 64 75 6c 65 2e 0a | - main |module..|
|00000040| 25 20 0a 25 20 41 75 74 | 68 6f 72 3a 09 47 65 72 |% .% Aut|hor:.Ger|
|00000050| 73 68 6f 6e 20 45 6c 62 | 65 72 0a 25 20 09 09 43 |shon Elb|er.% ..C|
|00000060| 6f 6d 70 75 74 65 72 20 | 53 63 69 65 6e 63 65 20 |omputer |Science |
|00000070| 44 65 70 74 2e 0a 25 20 | 09 09 55 6e 69 76 65 72 |Dept..% |..Univer|
|00000080| 73 69 74 79 20 6f 66 20 | 55 74 61 68 0a 25 20 44 |sity of |Utah.% D|
|00000090| 61 74 65 3a 09 53 75 6e | 20 53 65 70 20 31 31 20 |ate:.Sun| Sep 11 |
|000000a0| 31 39 39 34 0a 25 20 43 | 6f 70 79 72 69 67 68 74 |1994.% C|opyright|
|000000b0| 20 28 63 29 20 31 39 39 | 34 2c 20 55 6e 69 76 65 | (c) 199|4, Unive|
|000000c0| 72 73 69 74 79 20 6f 66 | 20 55 74 61 68 0a 25 0a |rsity of| Utah.%.|
|000000d0| 0a 25 5c 64 6f 63 75 6d | 65 6e 74 73 74 79 6c 65 |.%\docum|entstyle|
|000000e0| 5b 31 30 70 74 5d 7b 62 | 6f 6f 6b 7d 0a 5c 64 6f |[10pt]{b|ook}.\do|
|000000f0| 63 75 6d 65 6e 74 73 74 | 79 6c 65 7b 62 6f 6f 6b |cumentst|yle{book|
|00000100| 7d 0a 0a 5c 73 65 74 6c | 65 6e 67 74 68 7b 5c 6f |}..\setl|ength{\o|
|00000110| 64 64 73 69 64 65 6d 61 | 72 67 69 6e 7d 7b 30 2e |ddsidema|rgin}{0.|
|00000120| 30 69 6e 7d 0a 5c 73 65 | 74 6c 65 6e 67 74 68 7b |0in}.\se|tlength{|
|00000130| 5c 65 76 65 6e 73 69 64 | 65 6d 61 72 67 69 6e 7d |\evensid|emargin}|
|00000140| 7b 30 2e 30 69 6e 7d 0a | 5c 73 65 74 6c 65 6e 67 |{0.0in}.|\setleng|
|00000150| 74 68 7b 5c 74 6f 70 6d | 61 72 67 69 6e 7d 7b 2d |th{\topm|argin}{-|
|00000160| 30 2e 31 69 6e 7d 0a 5c | 73 65 74 6c 65 6e 67 74 |0.1in}.\|setlengt|
|00000170| 68 7b 5c 74 65 78 74 77 | 69 64 74 68 7d 7b 36 2e |h{\textw|idth}{6.|
|00000180| 35 69 6e 7d 0a 5c 73 65 | 74 6c 65 6e 67 74 68 7b |5in}.\se|tlength{|
|00000190| 5c 74 65 78 74 68 65 69 | 67 68 74 7d 7b 39 2e 35 |\texthei|ght}{9.5|
|000001a0| 69 6e 7d 0a 0a 5c 6d 61 | 6b 65 69 6e 64 65 78 0a |in}..\ma|keindex.|
|000001b0| 0a 5c 62 65 67 69 6e 7b | 64 6f 63 75 6d 65 6e 74 |.\begin{|document|
|000001c0| 7d 0a 0a 5c 73 6d 61 6c | 6c 0a 5c 73 65 74 6c 65 |}..\smal|l.\setle|
|000001d0| 6e 67 74 68 7b 5c 62 61 | 73 65 6c 69 6e 65 73 6b |ngth{\ba|selinesk|
|000001e0| 69 70 7d 7b 30 2e 38 35 | 5c 62 61 73 65 6c 69 6e |ip}{0.85|\baselin|
|000001f0| 65 73 6b 69 70 7d 0a 0a | 5c 74 61 62 6c 65 6f 66 |eskip}..|\tableof|
|00000200| 63 6f 6e 74 65 6e 74 73 | 0a 0a 25 25 25 25 25 25 |contents|..%%%%%%|
|00000210| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000220| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000230| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000240| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000250| 25 25 25 25 25 25 25 0a | 5c 63 68 61 70 74 65 72 |%%%%%%%.|\chapter|
|00000260| 7b 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 7d 0a 0a |{Introdu|ction}..|
|00000270| 54 68 69 73 20 6d 61 6e | 75 61 6c 20 64 65 73 63 |This man|ual desc|
|00000280| 72 69 62 65 73 20 74 68 | 65 20 64 69 66 66 65 72 |ribes th|e differ|
|00000290| 65 6e 74 20 6c 69 62 72 | 61 72 69 65 73 20 6f 66 |ent libr|aries of|
|000002a0| 20 74 68 65 20 49 52 49 | 54 20 73 6f 6c 69 64 0a | the IRI|T solid.|
|000002b0| 6d 6f 64 65 6c 69 6e 67 | 20 65 6e 76 69 72 6f 6e |modeling| environ|
|000002c0| 6d 65 6e 74 2e 20 51 75 | 69 74 65 20 61 20 66 65 |ment. Qu|ite a fe|
|000002d0| 77 20 6c 69 62 72 61 72 | 69 65 73 20 63 61 6e 20 |w librar|ies can |
|000002e0| 62 65 20 66 6f 75 6e 64 | 20 74 6f 20 6d 61 6e 69 |be found| to mani|
|000002f0| 70 75 6c 61 74 65 0a 67 | 65 6f 6d 65 74 72 79 20 |pulate.g|eometry |
|00000300| 69 6e 20 67 65 6e 65 72 | 61 6c 2c 20 66 72 65 65 |in gener|al, free|
|00000310| 66 6f 72 6d 20 63 75 72 | 76 65 73 20 61 6e 64 20 |form cur|ves and |
|00000320| 73 75 72 66 61 63 65 73 | 2c 20 73 79 6d 62 6f 6c |surfaces|, symbol|
|00000330| 69 63 0a 63 6f 6d 70 75 | 74 61 74 69 6f 6e 2c 20 |ic.compu|tation, |
|00000340| 74 72 69 6d 6d 65 64 20 | 73 75 72 66 61 63 65 73 |trimmed |surfaces|
|00000350| 2c 20 66 72 65 65 66 6f | 72 6d 20 74 72 69 76 61 |, freefo|rm triva|
|00000360| 72 69 61 74 65 20 66 75 | 6e 63 74 69 6f 6e 73 2c |riate fu|nctions,|
|00000370| 20 42 6f 6f 6c 65 61 6e | 0a 6f 70 65 72 61 74 69 | Boolean|.operati|
|00000380| 6f 6e 73 2c 20 69 6e 70 | 75 74 20 6f 75 74 70 75 |ons, inp|ut outpu|
|00000390| 74 20 64 61 74 61 20 66 | 69 6c 65 20 70 61 72 73 |t data f|ile pars|
|000003a0| 69 6e 67 2c 20 61 6e 64 | 20 6d 69 73 63 65 6c 6c |ing, and| miscell|
|000003b0| 65 6e 65 6f 75 73 2e 0a | 0a 41 6c 6c 20 69 6e 74 |eneous..|.All int|
|000003c0| 65 72 66 61 63 65 20 74 | 6f 20 74 68 65 20 6c 69 |erface t|o the li|
|000003d0| 62 72 61 72 69 65 73 20 | 73 68 6f 75 6c 64 20 62 |braries |should b|
|000003e0| 65 20 6d 61 64 65 20 76 | 69 61 20 74 68 65 20 61 |e made v|ia the a|
|000003f0| 70 70 72 6f 70 72 69 61 | 74 65 20 68 65 61 64 65 |ppropria|te heade|
|00000400| 72 0a 66 69 6c 65 73 20 | 74 68 61 74 20 63 61 6e |r.files |that can|
|00000410| 20 62 65 20 66 6f 75 6e | 64 20 69 6e 20 74 68 65 | be foun|d in the|
|00000420| 20 69 6e 63 6c 75 64 65 | 20 73 75 62 64 69 72 65 | include| subdire|
|00000430| 63 74 6f 72 79 2e 20 4d | 6f 73 74 20 6c 69 62 72 |ctory. M|ost libr|
|00000440| 61 72 69 65 73 0a 68 61 | 76 65 20 61 20 73 69 6e |aries.ha|ve a sin|
|00000450| 67 6c 65 20 68 65 61 64 | 65 72 20 66 69 6c 65 20 |gle head|er file |
|00000460| 74 68 61 74 20 69 73 20 | 6e 61 6d 65 64 20 74 68 |that is |named th|
|00000470| 65 20 73 61 6d 65 20 61 | 73 20 74 68 65 20 6c 69 |e same a|s the li|
|00000480| 62 72 61 72 79 2e 0a 46 | 75 6e 63 74 69 6f 6e 73 |brary..F|unctions|
|00000490| 20 61 6e 64 20 63 6f 6e | 73 74 61 6e 74 73 20 74 | and con|stants t|
|000004a0| 68 61 74 20 61 72 65 20 | 76 69 73 69 62 6c 65 20 |hat are |visible |
|000004b0| 74 6f 20 74 68 65 20 75 | 73 65 72 73 20 6f 66 20 |to the u|sers of |
|000004c0| 74 68 65 20 6c 69 62 72 | 61 72 69 65 73 0a 61 72 |the libr|aries.ar|
|000004d0| 65 20 70 72 65 66 69 78 | 65 64 20 77 69 74 68 20 |e prefix|ed with |
|000004e0| 61 20 75 6e 69 71 75 65 | 20 70 72 65 66 69 78 2c |a unique| prefix,|
|000004f0| 20 75 73 75 61 6c 6c 79 | 20 64 65 72 69 76 65 64 | usually| derived|
|00000500| 20 66 72 6f 6d 20 74 68 | 65 20 6c 69 62 72 61 72 | from th|e librar|
|00000510| 79 0a 6e 61 6d 65 20 69 | 74 73 65 6c 66 2e 20 45 |y.name i|tself. E|
|00000520| 78 74 65 72 6e 61 6c 20 | 64 65 66 69 6e 69 74 69 |xternal |definiti|
|00000530| 6f 6e 73 20 74 68 61 74 | 20 73 74 61 72 74 20 77 |ons that| start w|
|00000540| 69 74 68 20 61 6e 20 75 | 6e 64 65 72 73 63 6f 72 |ith an u|nderscor|
|00000550| 65 20 73 68 6f 75 6c 64 | 0a 6e 6f 74 20 62 65 20 |e should|.not be |
|00000560| 75 73 65 64 2c 20 65 76 | 65 6e 20 69 66 20 66 6f |used, ev|en if fo|
|00000570| 75 6e 64 20 69 6e 20 68 | 65 61 64 65 72 20 66 69 |und in h|eader fi|
|00000580| 6c 65 73 2e 0a 0a 54 68 | 65 20 68 65 61 64 65 72 |les...Th|e header|
|00000590| 20 66 69 6c 65 20 7b 5c | 62 66 20 69 6e 63 6c 75 | file {\|bf inclu|
|000005a0| 64 65 2f 69 72 69 74 5c | 5f 73 6d 2e 68 7d 20 6d |de/irit\|_sm.h} m|
|000005b0| 75 73 74 20 62 65 20 73 | 6f 75 72 63 65 64 20 62 |ust be s|ourced b|
|000005c0| 79 20 65 76 65 72 79 0a | 73 6f 75 72 63 65 20 66 |y every.|source f|
|000005d0| 69 6c 65 20 69 6e 20 74 | 68 65 20 73 6f 6c 69 64 |ile in t|he solid|
|000005e0| 20 6d 6f 64 65 6c 6c 65 | 72 2e 20 49 6e 20 6d 6f | modelle|r. In mo|
|000005f0| 73 74 20 63 61 73 65 73 | 2c 20 74 68 69 73 20 66 |st cases|, this f|
|00000600| 69 6c 65 20 69 73 20 73 | 6f 75 72 63 65 64 0a 69 |ile is s|ourced.i|
|00000610| 6e 64 69 72 65 63 74 6c | 79 20 76 69 61 20 6c 6f |ndirectl|y via lo|
|00000620| 63 61 6c 20 68 65 61 64 | 65 72 20 66 69 6c 65 73 |cal head|er files|
|00000630| 2e 0a 0a 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |...The f|ollowing|
|00000640| 20 6c 69 62 72 61 72 69 | 65 73 20 61 72 65 20 61 | librari|es are a|
|00000650| 76 61 6c 69 61 62 6c 65 | 20 69 6e 20 49 52 49 54 |valiable| in IRIT|
|00000660| 3a 0a 5c 62 65 67 69 6e | 7b 63 65 6e 74 65 72 7d |:.\begin|{center}|
|00000670| 0a 5c 62 65 67 69 6e 7b | 74 61 62 75 6c 61 72 7d |.\begin{|tabular}|
|00000680| 7b 7c 6c 7c 6c 7c 7d 20 | 5c 68 6c 69 6e 65 0a 20 |{|l|l|} |\hline. |
|00000690| 20 20 20 4e 61 6d 65 20 | 6f 66 20 4c 69 62 72 61 | Name |of Libra|
|000006a0| 72 79 20 26 20 54 61 73 | 6b 73 20 5c 5c 20 5c 68 |ry & Tas|ks \\ \h|
|000006b0| 6c 69 6e 65 0a 20 20 20 | 20 62 6f 6f 6c 20 26 20 |line. | bool & |
|000006c0| 42 6f 6f 6c 65 61 6e 20 | 6f 70 65 72 61 74 69 6f |Boolean |operatio|
|000006d0| 6e 73 20 6f 6e 20 70 6f | 6c 79 67 6f 6e 61 6c 20 |ns on po|lygonal |
|000006e0| 6d 6f 64 65 6c 73 2e 20 | 5c 5c 0a 20 20 20 20 63 |models. |\\. c|
|000006f0| 61 67 64 20 26 20 4c 6f | 77 20 6c 65 76 65 6c 20 |agd & Lo|w level |
|00000700| 66 72 65 65 66 6f 72 6d | 20 63 75 72 76 65 73 20 |freeform| curves |
|00000710| 61 6e 64 20 73 75 72 66 | 61 63 65 73 2e 20 5c 5c |and surf|aces. \\|
|00000720| 0a 20 20 20 20 67 65 6f | 6d 20 26 20 47 65 6e 65 |. geo|m & Gene|
|00000730| 72 61 6c 20 67 65 6f 6d | 65 74 72 79 20 66 75 6e |ral geom|etry fun|
|00000740| 63 74 69 6f 6e 73 2e 20 | 5c 5c 0a 20 20 20 20 6d |ctions. |\\. m|
|00000750| 69 73 63 20 26 20 6d 65 | 6d 6f 72 79 20 61 6c 6c |isc & me|mory all|
|00000760| 6f 63 61 74 69 6f 6e 2c | 20 63 6f 6e 66 69 67 75 |ocation,| configu|
|00000770| 72 61 74 69 6f 6e 20 66 | 69 6c 65 73 2c 20 61 74 |ration f|iles, at|
|00000780| 74 72 69 62 75 74 65 73 | 2c 20 65 74 63 2e 20 5c |tributes|, etc. \|
|00000790| 5c 0a 20 20 20 20 70 72 | 73 72 20 26 20 69 6e 70 |\. pr|sr & inp|
|000007a0| 75 74 20 61 6e 64 20 6f | 75 74 70 75 74 20 66 6f |ut and o|utput fo|
|000007b0| 72 20 66 69 6c 65 2f 73 | 6f 63 6b 65 74 73 20 6f |r file/s|ockets o|
|000007c0| 66 20 6f 62 6a 65 63 74 | 73 20 6f 66 20 49 52 49 |f object|s of IRI|
|000007d0| 54 2e 20 5c 5c 0a 20 20 | 20 20 73 79 6d 62 20 26 |T. \\. | symb &|
|000007e0| 20 53 79 6d 62 6f 6c 69 | 63 20 6d 61 6e 69 70 75 | Symboli|c manipu|
|000007f0| 6c 61 74 69 6f 6e 20 6f | 66 20 63 75 72 76 65 73 |lation o|f curves|
|00000800| 20 61 6e 64 20 73 75 72 | 66 61 63 65 73 2e 20 5c | and sur|faces. \|
|00000810| 5c 0a 20 20 20 20 74 72 | 69 6d 20 26 20 54 72 69 |\. tr|im & Tri|
|00000820| 6d 6d 65 64 20 73 75 72 | 66 61 63 65 73 20 73 75 |mmed sur|faces su|
|00000830| 70 70 6f 72 74 2e 20 5c | 5c 0a 20 20 20 20 74 72 |pport. \|\. tr|
|00000840| 69 76 20 26 20 46 72 65 | 65 66 6f 72 6d 20 74 72 |iv & Fre|eform tr|
|00000850| 69 76 61 72 69 61 74 65 | 20 66 75 6e 63 74 69 6f |ivariate| functio|
|00000860| 6e 73 2e 20 5c 5c 0a 20 | 20 20 20 78 74 72 61 20 |ns. \\. | xtra |
|00000870| 26 20 50 75 62 6c 69 63 | 20 64 6f 6d 61 69 6e 20 |& Public| domain |
|00000880| 63 6f 64 65 20 74 68 61 | 74 20 69 73 20 6e 6f 74 |code tha|t is not|
|00000890| 20 70 61 72 74 20 6f 66 | 20 49 52 49 54 2e 20 5c | part of| IRIT. \|
|000008a0| 5c 20 5c 68 6c 69 6e 65 | 0a 5c 65 6e 64 7b 74 61 |\ \hline|.\end{ta|
|000008b0| 62 75 6c 61 72 7d 0a 5c | 65 6e 64 7b 63 65 6e 74 |bular}.\|end{cent|
|000008c0| 65 72 7d 0a 0a 54 68 65 | 20 66 6f 6c 6c 6f 77 69 |er}..The| followi|
|000008d0| 6e 67 20 63 68 61 70 74 | 65 72 73 20 72 65 66 65 |ng chapt|ers refe|
|000008e0| 72 65 6e 63 65 20 74 68 | 65 20 64 69 66 66 65 72 |rence th|e differ|
|000008f0| 65 6e 74 20 66 75 6e 63 | 74 69 6f 6e 20 6f 66 20 |ent func|tion of |
|00000900| 64 69 66 66 65 72 65 6e | 74 0a 6c 69 62 72 61 72 |differen|t.librar|
|00000910| 69 65 73 2e 20 43 68 61 | 70 74 65 72 7e 5c 72 65 |ies. Cha|pter~\re|
|00000920| 66 7b 63 68 61 70 2d 65 | 78 61 6d 70 6c 65 73 7d |f{chap-e|xamples}|
|00000930| 20 70 72 6f 76 69 64 65 | 73 20 73 65 76 65 72 61 | provide|s severa|
|00000940| 6c 20 65 78 61 6d 70 6c | 65 73 20 6f 66 0a 77 72 |l exampl|es of.wr|
|00000950| 69 74 69 6e 67 20 43 20 | 63 6f 64 65 20 75 73 69 |iting C |code usi|
|00000960| 6e 67 20 74 68 65 20 49 | 52 49 54 20 6c 69 62 72 |ng the I|RIT libr|
|00000970| 61 72 69 65 73 2e 0a 0a | 25 25 25 25 25 25 25 25 |aries...|%%%%%%%%|
|00000980| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000990| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000009a0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000009b0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000009c0| 25 25 25 25 25 0a 5c 63 | 68 61 70 74 65 72 7b 42 |%%%%%.\c|hapter{B|
|000009d0| 6f 6f 6c 65 61 6e 20 4c | 69 62 72 61 72 79 2c 20 |oolean L|ibrary, |
|000009e0| 62 6f 6f 6c 5c 5f 6c 69 | 62 7d 0a 0a 5c 73 65 63 |bool\_li|b}..\sec|
|000009f0| 74 69 6f 6e 7b 47 65 6e | 65 72 61 6c 20 49 6e 66 |tion{Gen|eral Inf|
|00000a00| 6f 72 6d 61 74 69 6f 6e | 7d 0a 0a 4f 6e 20 6f 66 |ormation|}..On of|
|00000a10| 20 74 68 65 20 63 72 75 | 63 69 61 6c 20 6f 70 65 | the cru|cial ope|
|00000a20| 72 61 74 69 6f 6e 20 69 | 6e 20 61 6e 79 20 73 6f |ration i|n any so|
|00000a30| 6c 69 64 20 6d 6f 64 65 | 6c 69 6e 67 20 65 6e 76 |lid mode|ling env|
|00000a40| 69 72 6f 6e 6d 65 6e 74 | 20 69 73 20 74 68 65 0a |ironment| is the.|
|00000a50| 61 62 69 6c 69 74 79 20 | 74 6f 20 70 65 72 66 6f |ability |to perfo|
|00000a60| 72 6d 20 42 6f 6f 6c 65 | 61 6e 20 6f 70 65 72 61 |rm Boole|an opera|
|00000a70| 74 69 6f 6e 73 20 61 6d | 6f 6e 67 20 64 69 66 66 |tions am|ong diff|
|00000a80| 65 72 65 6e 74 20 67 65 | 6f 6d 65 74 72 69 63 0a |erent ge|ometric.|
|00000a90| 6f 62 6a 65 63 74 73 2e | 20 20 54 68 65 20 69 6e |objects.| The in|
|00000aa0| 74 65 72 66 61 63 65 20 | 6f 66 20 74 68 65 20 6c |terface |of the l|
|00000ab0| 69 62 72 61 72 79 20 69 | 73 20 64 65 66 69 6e 65 |ibrary i|s define|
|00000ac0| 64 20 69 6e 20 7b 5c 65 | 6d 0a 69 6e 63 6c 75 64 |d in {\e|m.includ|
|00000ad0| 65 2f 62 6f 6f 6c 5c 5f | 6c 69 62 2e 68 7d 2e 20 |e/bool\_|lib.h}. |
|00000ae0| 54 68 69 73 20 6c 69 62 | 72 61 72 79 20 73 75 70 |This lib|rary sup|
|00000af0| 70 6f 72 74 73 20 6f 6e | 6c 79 20 42 6f 6f 6c 65 |ports on|ly Boole|
|00000b00| 61 6e 20 6f 70 65 72 61 | 74 69 6f 6e 73 20 6f 66 |an opera|tions of|
|00000b10| 0a 70 6f 6c 79 67 6f 6e | 61 6c 20 6f 62 6a 65 63 |.polygon|al objec|
|00000b20| 74 73 2e 20 54 68 65 20 | 42 6f 6f 6c 65 61 6e 20 |ts. The |Boolean |
|00000b30| 6f 70 65 72 61 74 69 6f | 6e 73 20 6f 66 20 4f 52 |operatio|ns of OR|
|00000b40| 2c 20 41 4e 44 2c 20 53 | 55 42 74 72 61 63 74 2c |, AND, S|UBtract,|
|00000b50| 0a 4e 45 47 61 74 65 2c | 20 43 55 54 2c 20 61 6e |.NEGate,| CUT, an|
|00000b60| 64 20 4d 45 52 47 45 20 | 61 72 65 20 73 75 70 70 |d MERGE |are supp|
|00000b70| 6f 72 74 65 64 20 76 69 | 61 20 74 68 65 20 7b 5c |orted vi|a the {\|
|00000b80| 62 66 20 42 6f 6f 6c 4f | 70 65 72 54 79 70 65 7d |bf BoolO|perType}|
|00000b90| 0a 74 79 70 65 64 65 66 | 3a 0a 5c 62 65 67 69 6e |.typedef|:.\begin|
|00000ba0| 7b 63 65 6e 74 65 72 7d | 0a 5c 62 65 67 69 6e 7b |{center}|.\begin{|
|00000bb0| 74 61 62 75 6c 61 72 7d | 7b 7c 7c 63 7c 63 7c 7c |tabular}|{||c|c|||
|00000bc0| 7d 20 5c 68 6c 69 6e 65 | 20 0a 20 20 20 20 42 6f |} \hline| . Bo|
|00000bd0| 6f 6c 4f 70 65 72 54 79 | 70 65 20 26 20 4d 65 61 |olOperTy|pe & Mea|
|00000be0| 6e 69 6e 67 20 5c 5c 20 | 5c 68 6c 69 6e 65 0a 20 |ning \\ |\hline. |
|00000bf0| 20 20 20 42 4f 4f 4c 5c | 5f 4f 50 45 52 5c 5f 4f | BOOL\|_OPER\_O|
|00000c00| 52 20 26 20 55 6e 69 6f | 6e 20 6f 66 20 74 77 6f |R & Unio|n of two|
|00000c10| 20 67 65 6f 6d 65 74 72 | 69 63 61 6c 20 6f 62 6a | geometr|ical obj|
|00000c20| 65 63 74 73 20 5c 5c 0a | 20 20 20 20 42 4f 4f 4c |ects \\.| BOOL|
|00000c30| 5c 5f 4f 50 45 52 5c 5f | 41 4e 44 20 26 20 49 6e |\_OPER\_|AND & In|
|00000c40| 74 65 72 73 65 63 74 69 | 6f 6e 20 6f 66 20 74 77 |tersecti|on of tw|
|00000c50| 6f 20 67 65 6f 6d 65 74 | 72 69 63 61 6c 20 6f 62 |o geomet|rical ob|
|00000c60| 6a 65 63 74 73 20 5c 5c | 0a 20 20 20 20 42 4f 4f |jects \\|. BOO|
|00000c70| 4c 5c 5f 4f 50 45 52 5c | 5f 53 55 42 20 26 20 54 |L\_OPER\|_SUB & T|
|00000c80| 68 65 20 64 69 66 66 65 | 72 65 6e 63 65 20 6f 66 |he diffe|rence of|
|00000c90| 20 74 77 6f 20 67 65 6f | 6d 65 74 72 69 63 61 6c | two geo|metrical|
|00000ca0| 20 6f 62 6a 65 63 74 73 | 20 5c 5c 0a 20 20 20 20 | objects| \\. |
|00000cb0| 42 4f 4f 4c 5c 5f 4f 50 | 45 52 5c 5f 4e 45 47 20 |BOOL\_OP|ER\_NEG |
|00000cc0| 26 20 55 6e 61 72 79 20 | 49 6e 73 69 64 65 2d 6f |& Unary |Inside-o|
|00000cd0| 75 74 20 6f 66 20 6f 6e | 65 20 67 65 6f 6d 65 74 |ut of on|e geomet|
|00000ce0| 72 69 63 61 6c 20 6f 62 | 6a 65 63 74 20 5c 5c 0a |rical ob|ject \\.|
|00000cf0| 20 20 20 20 42 4f 4f 4c | 5c 5f 4f 50 45 52 5c 5f | BOOL|\_OPER\_|
|00000d00| 43 55 54 20 26 20 42 6f | 75 6e 64 61 72 79 20 6f |CUT & Bo|undary o|
|00000d10| 66 20 6f 6e 65 20 6f 62 | 6a 65 63 74 20 6f 75 74 |f one ob|ject out|
|00000d20| 73 69 64 65 20 74 68 65 | 20 6f 74 68 65 72 20 5c |side the| other \|
|00000d30| 5c 0a 20 20 20 20 42 4f | 4f 4c 5c 5f 4f 50 45 52 |\. BO|OL\_OPER|
|00000d40| 5c 5f 4d 45 52 47 45 20 | 26 20 53 69 6d 70 6c 65 |\_MERGE |& Simple|
|00000d50| 20 6d 65 72 67 65 20 77 | 69 74 68 6f 75 74 20 61 | merge w|ithout a|
|00000d60| 6e 79 20 63 6f 6d 70 75 | 74 61 74 69 6f 6e 20 5c |ny compu|tation \|
|00000d70| 5c 20 5c 68 6c 69 6e 65 | 0a 5c 65 6e 64 7b 74 61 |\ \hline|.\end{ta|
|00000d80| 62 75 6c 61 72 7d 0a 5c | 65 6e 64 7b 63 65 6e 74 |bular}.\|end{cent|
|00000d90| 65 72 7d 0a 0a 54 68 65 | 20 7b 5c 62 66 20 42 6f |er}..The| {\bf Bo|
|00000da0| 6f 6c 4f 70 65 72 54 79 | 70 65 7d 20 74 79 70 65 |olOperTy|pe} type|
|00000db0| 64 65 66 20 69 73 20 75 | 73 65 64 20 69 6e 20 74 |def is u|sed in t|
|00000dc0| 77 6f 20 64 69 6d 65 6e | 73 69 6f 6e 61 6c 20 42 |wo dimen|sional B|
|00000dd0| 6f 6f 6c 65 61 6e 20 6f | 70 65 72 61 74 69 6f 6e |oolean o|peration|
|00000de0| 73 0a 69 6e 76 6f 6b 65 | 64 20 76 69 61 20 7b 5c |s.invoke|d via {\|
|00000df0| 62 66 20 42 6f 6f 6c 65 | 61 6e 32 44 7d 2e 20 54 |bf Boole|an2D}. T|
|00000e00| 68 72 65 65 20 64 69 6d | 65 6e 73 69 6f 6e 61 6c |hree dim|ensional|
|00000e10| 20 42 6f 6f 6c 65 61 6e | 20 6f 70 65 72 61 74 69 | Boolean| operati|
|00000e20| 6f 6e 73 20 61 72 65 0a | 69 6e 76 6f 6b 65 64 20 |ons are.|invoked |
|00000e30| 76 69 61 20 7b 5c 62 66 | 20 42 6f 6f 6c 65 61 6e |via {\bf| Boolean|
|00000e40| 58 58 58 7d 20 77 68 65 | 72 65 20 58 58 58 20 69 |XXX} whe|re XXX i|
|00000e50| 73 20 6f 6e 65 20 6f 66 | 20 4f 52 2c 20 41 4e 44 |s one of| OR, AND|
|00000e60| 2c 20 53 55 42 2c 20 4e | 45 47 2c 20 43 55 54 0a |, SUB, N|EG, CUT.|
|00000e70| 6f 72 20 4d 45 52 47 45 | 2c 20 64 65 6e 6f 74 69 |or MERGE|, denoti|
|00000e80| 6e 67 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 69 |ng the s|ame as i|
|00000e90| 6e 20 74 68 65 20 74 61 | 62 6c 65 20 61 62 6f 76 |n the ta|ble abov|
|00000ea0| 65 2e 0a 0a 49 6e 20 61 | 64 64 69 74 69 6f 6e 20 |e...In a|ddition |
|00000eb0| 73 65 76 65 72 61 6c 20 | 73 74 61 74 65 20 66 75 |several |state fu|
|00000ec0| 6e 63 74 69 6f 6e 73 20 | 61 72 65 20 61 76 61 69 |nctions |are avai|
|00000ed0| 6c 61 62 6c 65 20 74 6f | 20 63 6f 6e 74 72 6f 6c |lable to| control|
|00000ee0| 20 74 68 65 20 77 61 79 | 0a 74 68 65 20 42 6f 6f | the way|.the Boo|
|00000ef0| 6c 65 61 6e 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |lean ope|rations |
|00000f00| 61 72 65 20 63 6f 6e 64 | 75 63 74 65 64 2e 20 46 |are cond|ucted. F|
|00000f10| 75 6e 63 74 69 6f 6e 73 | 20 74 6f 20 65 6e 61 62 |unctions| to enab|
|00000f20| 6c 65 20 74 68 65 20 64 | 75 6d 70 20 6f 66 0a 28 |le the d|ump of.(|
|00000f30| 6f 6e 6c 79 29 20 74 68 | 65 20 69 6e 74 65 72 73 |only) th|e inters|
|00000f40| 65 63 74 69 6f 6e 20 63 | 75 72 76 65 73 2c 20 74 |ection c|urves, t|
|00000f50| 6f 20 68 61 6e 64 6c 65 | 20 63 6f 70 6c 61 6e 61 |o handle| coplana|
|00000f60| 72 20 70 6f 6c 79 67 6f | 6e 73 2c 20 61 6e 64 20 |r polygo|ns, and |
|00000f70| 74 6f 0a 73 65 74 20 74 | 68 65 20 61 78 69 73 20 |to.set t|he axis |
|00000f80| 61 6c 6f 6e 67 20 77 68 | 69 63 68 20 74 68 65 20 |along wh|ich the |
|00000f90| 73 77 65 65 70 20 69 73 | 20 70 65 72 66 6f 72 6d |sweep is| perform|
|00000fa0| 65 64 20 61 72 65 20 70 | 72 6f 76 69 64 65 64 2e |ed are p|rovided.|
|00000fb0| 0a 0a 41 6c 6c 20 67 6c | 6f 62 61 6c 73 20 69 6e |..All gl|obals in|
|00000fc0| 20 74 68 69 73 20 6c 69 | 62 72 61 72 79 20 68 61 | this li|brary ha|
|00000fd0| 76 65 20 61 20 70 72 6f | 66 69 78 20 6f 66 20 7b |ve a pro|fix of {|
|00000fe0| 5c 62 66 20 42 6f 6f 6c | 7d 2e 0a 0a 5c 73 65 63 |\bf Bool|}...\sec|
|00000ff0| 74 69 6f 6e 7b 4c 69 62 | 72 61 72 79 20 46 75 6e |tion{Lib|rary Fun|
|00001000| 63 74 69 6f 6e 73 7d 0a | 5c 69 6e 70 75 74 7b 70 |ctions}.|\input{p|
|00001010| 72 6f 67 5f 6d 61 6e 2f | 62 6f 6f 6c 5f 6c 69 62 |rog_man/|bool_lib|
|00001020| 2e 74 65 78 7d 0a 0a 25 | 25 25 25 25 25 25 25 25 |.tex}..%|%%%%%%%%|
|00001030| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001040| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001050| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001060| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001070| 25 25 25 25 0a 5c 63 68 | 61 70 74 65 72 7b 43 41 |%%%%.\ch|apter{CA|
|00001080| 47 44 20 4c 69 62 72 61 | 72 79 2c 20 63 61 67 64 |GD Libra|ry, cagd|
|00001090| 5c 5f 6c 69 62 7d 0a 0a | 5c 73 65 63 74 69 6f 6e |\_lib}..|\section|
|000010a0| 7b 47 65 6e 65 72 61 6c | 20 49 6e 66 6f 72 6d 61 |{General| Informa|
|000010b0| 74 69 6f 6e 7d 0a 0a 54 | 68 69 73 20 6c 69 62 72 |tion}..T|his libr|
|000010c0| 61 72 79 20 70 72 6f 76 | 69 64 65 73 20 61 20 72 |ary prov|ides a r|
|000010d0| 69 63 68 20 73 65 74 20 | 6f 66 20 66 75 6e 63 74 |ich set |of funct|
|000010e0| 69 6f 6e 20 74 6f 20 63 | 72 65 61 74 65 2c 20 63 |ion to c|reate, c|
|000010f0| 6f 6e 76 65 72 74 2c 0a | 64 69 73 70 6c 61 79 20 |onvert,.|display |
|00001100| 61 6e 64 20 70 72 6f 63 | 65 73 73 20 66 72 65 65 |and proc|ess free|
|00001110| 66 6f 72 6d 20 42 65 7a | 69 65 72 20 61 6e 64 20 |form Bez|ier and |
|00001120| 4e 55 52 42 73 20 63 75 | 72 76 65 73 20 61 6e 64 |NURBs cu|rves and|
|00001130| 20 73 75 72 66 61 63 65 | 73 2e 20 54 68 65 0a 69 | surface|s. The.i|
|00001140| 6e 74 65 72 66 61 63 65 | 20 6f 66 20 74 68 65 20 |nterface| of the |
|00001150| 6c 69 62 72 61 72 79 20 | 69 73 20 64 65 66 69 6e |library |is defin|
|00001160| 65 64 20 69 6e 20 7b 5c | 65 6d 20 69 6e 63 6c 75 |ed in {\|em inclu|
|00001170| 64 65 2f 63 61 67 64 5c | 5f 6c 69 62 2e 68 7d 2e |de/cagd\|_lib.h}.|
|00001180| 20 54 68 69 73 0a 6c 69 | 62 72 61 72 79 20 6d 61 | This.li|brary ma|
|00001190| 69 6e 6c 79 20 73 75 70 | 70 6f 72 74 73 20 6c 6f |inly sup|ports lo|
|000011a0| 77 20 6c 65 76 65 6c 20 | 66 72 65 65 66 6f 72 6d |w level |freeform|
|000011b0| 20 63 75 72 76 65 20 61 | 6e 64 20 73 75 72 66 61 | curve a|nd surfa|
|000011c0| 63 65 0a 6f 70 65 72 61 | 74 69 6f 6e 73 2e 20 20 |ce.opera|tions. |
|000011d0| 53 75 70 70 6f 72 74 65 | 64 20 61 72 65 20 63 75 |Supporte|d are cu|
|000011e0| 72 76 65 73 20 61 6e 64 | 20 73 75 72 66 61 63 65 |rves and| surface|
|000011f0| 73 20 66 72 6f 6d 20 73 | 63 61 6c 61 72 73 20 74 |s from s|calars t|
|00001200| 6f 20 66 69 76 65 0a 64 | 69 6d 65 6e 73 69 6f 6e |o five.d|imension|
|00001210| 73 20 61 73 20 45 31 2f | 50 31 20 74 6f 20 45 35 |s as E1/|P1 to E5|
|00001220| 2f 50 35 20 75 73 69 6e | 67 20 74 68 65 20 7b 5c |/P5 usin|g the {\|
|00001230| 62 66 20 43 61 67 64 50 | 6f 69 6e 74 54 79 70 65 |bf CagdP|ointType|
|00001240| 7d 2e 20 50 69 20 69 73 | 20 61 0a 72 61 74 69 6f |}. Pi is| a.ratio|
|00001250| 6e 61 6c 20 28 70 72 6f | 6a 65 63 74 69 76 65 29 |nal (pro|jective)|
|00001260| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 45 69 2c 20 | version| of Ei, |
|00001270| 77 69 74 68 20 61 6e 20 | 61 64 64 69 74 69 6f 6e |with an |addition|
|00001280| 61 6c 20 57 20 63 6f 65 | 66 66 69 63 69 65 6e 74 |al W coe|fficient|
|00001290| 2e 0a 50 6f 6c 79 6e 6f | 6d 69 61 6c 20 69 6e 20 |..Polyno|mial in |
|000012a0| 74 68 65 20 70 6f 77 65 | 72 20 62 61 73 69 73 20 |the powe|r basis |
|000012b0| 68 61 76 65 20 73 6f 6d | 65 20 76 65 72 79 20 6c |have som|e very l|
|000012c0| 69 6d 69 74 65 64 20 73 | 75 70 70 6f 72 74 20 61 |imited s|upport a|
|000012d0| 73 20 77 65 6c 6c 2e 0a | 44 69 66 66 65 72 65 6e |s well..|Differen|
|000012e0| 74 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t data s|tructure|
|000012f0| 73 20 74 6f 20 68 6f 6c | 64 20 55 56 20 70 61 72 |s to hol|d UV par|
|00001300| 61 6d 65 74 65 72 20 76 | 61 6c 75 65 73 2c 20 63 |ameter v|alues, c|
|00001310| 6f 6e 74 72 6f 6c 20 70 | 6f 69 6e 74 73 2c 0a 76 |ontrol p|oints,.v|
|00001320| 65 63 74 6f 72 73 2c 20 | 70 6c 61 6e 65 73 2c 20 |ectors, |planes, |
|00001330| 62 6f 75 6e 64 69 6e 67 | 20 62 6f 78 65 73 2c 20 |bounding| boxes, |
|00001340| 70 6f 6c 79 6c 69 6e 65 | 73 20 61 6e 64 20 70 6f |polyline|s and po|
|00001350| 6c 79 67 6f 6e 73 20 61 | 72 65 20 64 65 66 69 6e |lygons a|re defin|
|00001360| 65 64 20 61 73 0a 77 65 | 6c 6c 20 61 73 20 74 68 |ed as.we|ll as th|
|00001370| 65 20 64 61 74 61 20 73 | 74 72 63 75 74 75 72 65 |e data s|trcuture|
|00001380| 73 20 74 6f 20 68 6f 6c | 64 20 74 68 65 20 63 75 |s to hol|d the cu|
|00001390| 72 76 65 73 20 61 6e 64 | 20 73 75 72 66 61 63 65 |rves and| surface|
|000013a0| 73 0a 74 68 65 6d 73 65 | 6c 76 65 73 2c 0a 5c 62 |s.themse|lves,.\b|
|000013b0| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0a 74 |egin{ver|batim}.t|
|000013c0| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 20 43 61 |ypedef s|truct Ca|
|000013d0| 67 64 43 72 76 53 74 72 | 75 63 74 20 7b 0a 20 20 |gdCrvStr|uct {. |
|000013e0| 20 20 73 74 72 75 63 74 | 20 43 61 67 64 43 72 76 | struct| CagdCrv|
|000013f0| 53 74 72 75 63 74 20 2a | 50 6e 65 78 74 3b 0a 20 |Struct *|Pnext;. |
|00001400| 20 20 20 73 74 72 75 63 | 74 20 49 50 41 74 74 72 | struc|t IPAttr|
|00001410| 69 62 75 74 65 53 74 72 | 75 63 74 20 2a 41 74 74 |ibuteStr|uct *Att|
|00001420| 72 3b 0a 20 20 20 20 43 | 61 67 64 47 65 6f 6d 54 |r;. C|agdGeomT|
|00001430| 79 70 65 20 47 54 79 70 | 65 3b 0a 20 20 20 20 43 |ype GTyp|e;. C|
|00001440| 61 67 64 50 6f 69 6e 74 | 54 79 70 65 20 50 54 79 |agdPoint|Type PTy|
|00001450| 70 65 3b 0a 20 20 20 20 | 69 6e 74 20 4c 65 6e 67 |pe;. |int Leng|
|00001460| 74 68 3b 20 20 20 20 20 | 20 20 20 20 20 20 20 2f |th; | /|
|00001470| 2a 20 4e 75 6d 62 65 72 | 20 6f 66 20 63 6f 6e 74 |* Number| of cont|
|00001480| 72 6f 6c 20 70 6f 69 6e | 74 73 20 28 3d 3d 20 6f |rol poin|ts (== o|
|00001490| 72 64 65 72 20 69 6e 20 | 42 65 7a 69 65 72 29 2e |rder in |Bezier).|
|000014a0| 20 2a 2f 0a 20 20 20 20 | 69 6e 74 20 4f 72 64 65 | */. |int Orde|
|000014b0| 72 3b 09 20 20 20 20 2f | 2a 20 4f 72 64 65 72 20 |r;. /|* Order |
|000014c0| 6f 66 20 63 75 72 76 65 | 20 28 6f 6e 6c 79 20 66 |of curve| (only f|
|000014d0| 6f 72 20 42 73 70 6c 69 | 6e 65 2c 20 69 67 6e 6f |or Bspli|ne, igno|
|000014e0| 72 65 64 20 69 6e 20 42 | 65 7a 69 65 72 29 2e 20 |red in B|ezier). |
|000014f0| 2a 2f 0a 20 20 20 20 43 | 61 67 64 42 54 79 70 65 |*/. C|agdBType|
|00001500| 20 50 65 72 69 6f 64 69 | 63 3b 09 09 09 20 20 20 | Periodi|c;... |
|00001510| 2f 2a 20 56 61 6c 69 64 | 20 6f 6e 6c 79 20 66 6f |/* Valid| only fo|
|00001520| 72 20 42 73 70 6c 69 6e | 65 20 63 75 72 76 65 73 |r Bsplin|e curves|
|00001530| 2e 20 2a 2f 0a 20 20 20 | 20 43 61 67 64 52 54 79 |. */. | CagdRTy|
|00001540| 70 65 20 2a 50 6f 69 6e | 74 73 5b 43 41 47 44 5f |pe *Poin|ts[CAGD_|
|00001550| 4d 41 58 5f 50 54 5f 53 | 49 5a 45 5d 3b 20 20 20 |MAX_PT_S|IZE]; |
|00001560| 20 20 2f 2a 20 50 6f 69 | 6e 74 65 72 20 6f 6e 20 | /* Poi|nter on |
|00001570| 65 61 63 68 20 61 78 69 | 73 20 76 65 63 74 6f 72 |each axi|s vector|
|00001580| 2e 20 2a 2f 0a 20 20 20 | 20 43 61 67 64 52 54 79 |. */. | CagdRTy|
|00001590| 70 65 20 2a 4b 6e 6f 74 | 56 65 63 74 6f 72 3b 0a |pe *Knot|Vector;.|
|000015a0| 7d 20 43 61 67 64 43 72 | 76 53 74 72 75 63 74 3b |} CagdCr|vStruct;|
|000015b0| 0a 0a 74 79 70 65 64 65 | 66 20 73 74 72 75 63 74 |..typede|f struct|
|000015c0| 20 43 61 67 64 53 72 66 | 53 74 72 75 63 74 20 7b | CagdSrf|Struct {|
|000015d0| 0a 20 20 20 20 73 74 72 | 75 63 74 20 43 61 67 64 |. str|uct Cagd|
|000015e0| 53 72 66 53 74 72 75 63 | 74 20 2a 50 6e 65 78 74 |SrfStruc|t *Pnext|
|000015f0| 3b 0a 20 20 20 20 73 74 | 72 75 63 74 20 49 50 41 |;. st|ruct IPA|
|00001600| 74 74 72 69 62 75 74 65 | 53 74 72 75 63 74 20 2a |ttribute|Struct *|
|00001610| 41 74 74 72 3b 0a 20 20 | 20 20 43 61 67 64 47 65 |Attr;. | CagdGe|
|00001620| 6f 6d 54 79 70 65 20 47 | 54 79 70 65 3b 0a 20 20 |omType G|Type;. |
|00001630| 20 20 43 61 67 64 50 6f | 69 6e 74 54 79 70 65 20 | CagdPo|intType |
|00001640| 50 54 79 70 65 3b 0a 20 | 20 20 20 69 6e 74 20 55 |PType;. | int U|
|00001650| 4c 65 6e 67 74 68 2c 20 | 56 4c 65 6e 67 74 68 3b |Length, |VLength;|
|00001660| 09 20 2f 2a 20 4d 65 73 | 68 20 73 69 7a 65 20 69 |. /* Mes|h size i|
|00001670| 6e 20 74 68 65 20 74 65 | 6e 73 6f 72 20 70 72 6f |n the te|nsor pro|
|00001680| 64 75 63 74 20 73 75 72 | 66 61 63 65 2e 20 2a 2f |duct sur|face. */|
|00001690| 0a 20 20 20 20 69 6e 74 | 20 55 4f 72 64 65 72 2c |. int| UOrder,|
|000016a0| 20 56 4f 72 64 65 72 3b | 20 20 20 2f 2a 20 4f 72 | VOrder;| /* Or|
|000016b0| 64 65 72 20 69 6e 20 74 | 65 6e 73 6f 72 20 70 72 |der in t|ensor pr|
|000016c0| 6f 64 75 63 74 20 73 75 | 72 66 61 63 65 20 28 42 |oduct su|rface (B|
|000016d0| 73 70 6c 69 6e 65 20 6f | 6e 6c 79 29 2e 20 2a 2f |spline o|nly). */|
|000016e0| 0a 20 20 20 20 43 61 67 | 64 42 54 79 70 65 20 55 |. Cag|dBType U|
|000016f0| 50 65 72 69 6f 64 69 63 | 2c 20 56 50 65 72 69 6f |Periodic|, VPerio|
|00001700| 64 69 63 3b 20 20 20 20 | 20 20 2f 2a 20 56 61 6c |dic; | /* Val|
|00001710| 69 64 20 6f 6e 6c 79 20 | 66 6f 72 20 42 73 70 6c |id only |for Bspl|
|00001720| 69 6e 65 20 73 75 72 66 | 61 63 65 73 2e 20 2a 2f |ine surf|aces. */|
|00001730| 0a 20 20 20 20 43 61 67 | 64 52 54 79 70 65 20 2a |. Cag|dRType *|
|00001740| 50 6f 69 6e 74 73 5b 43 | 41 47 44 5f 4d 41 58 5f |Points[C|AGD_MAX_|
|00001750| 50 54 5f 53 49 5a 45 5d | 3b 20 20 20 20 20 2f 2a |PT_SIZE]|; /*|
|00001760| 20 50 6f 69 6e 74 65 72 | 20 6f 6e 20 65 61 63 68 | Pointer| on each|
|00001770| 20 61 78 69 73 20 76 65 | 63 74 6f 72 2e 20 2a 2f | axis ve|ctor. */|
|00001780| 0a 20 20 20 20 43 61 67 | 64 52 54 79 70 65 20 2a |. Cag|dRType *|
|00001790| 55 4b 6e 6f 74 56 65 63 | 74 6f 72 2c 20 2a 56 4b |UKnotVec|tor, *VK|
|000017a0| 6e 6f 74 56 65 63 74 6f | 72 3b 0a 7d 20 43 61 67 |notVecto|r;.} Cag|
|000017b0| 64 53 72 66 53 74 72 75 | 63 74 3b 0a 5c 65 6e 64 |dSrfStru|ct;.\end|
|000017c0| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 0a 43 75 72 76 |{verbati|m}..Curv|
|000017d0| 65 73 20 61 6e 64 20 73 | 75 72 66 61 63 65 73 20 |es and s|urfaces |
|000017e0| 68 61 76 65 20 61 20 67 | 65 6f 6d 65 74 72 69 63 |have a g|eometric|
|000017f0| 20 74 79 70 65 20 7b 5c | 62 66 20 47 54 79 70 65 | type {\|bf GType|
|00001800| 7d 20 74 6f 20 70 72 65 | 73 63 72 69 62 65 20 74 |} to pre|scribe t|
|00001810| 68 65 0a 74 79 70 65 20 | 6f 66 20 65 6e 74 69 74 |he.type |of entit|
|00001820| 79 20 28 73 75 63 68 20 | 61 73 20 43 41 47 44 5c |y (such |as CAGD\|
|00001830| 5f 53 42 45 5a 49 45 52 | 5c 5f 54 59 50 45 20 66 |_SBEZIER|\_TYPE f|
|00001840| 6f 72 20 42 65 7a 69 65 | 72 20 73 75 72 66 61 63 |or Bezie|r surfac|
|00001850| 65 29 20 61 6e 64 20 61 | 0a 70 6f 69 6e 74 20 74 |e) and a|.point t|
|00001860| 79 70 65 20 7b 5c 62 66 | 20 50 54 79 70 65 7d 20 |ype {\bf| PType} |
|00001870| 74 6f 20 70 72 65 73 63 | 72 69 62 65 20 74 68 65 |to presc|ribe the|
|00001880| 20 70 6f 69 6e 74 20 74 | 79 70 65 20 6f 66 20 74 | point t|ype of t|
|00001890| 68 65 20 65 6e 74 69 74 | 79 20 28 73 75 63 68 0a |he entit|y (such.|
|000018a0| 61 73 20 43 41 47 44 5c | 5f 50 54 5c 5f 45 33 5c |as CAGD\|_PT\_E3\|
|000018b0| 5f 54 59 50 45 20 66 6f | 72 20 74 68 72 65 65 20 |_TYPE fo|r three |
|000018c0| 64 69 6d 65 6e 73 69 6f | 6e 61 6c 20 45 75 63 6c |dimensio|nal Eucl|
|000018d0| 69 64 65 61 6e 20 63 6f | 6e 74 72 6f 6c 20 70 6f |idean co|ntrol po|
|000018e0| 69 6e 74 73 29 2e 0a 7b | 5c 62 66 20 4c 65 6e 67 |ints)..{|\bf Leng|
|000018f0| 74 68 7d 20 61 6e 64 20 | 7b 5c 62 66 20 4f 72 64 |th} and |{\bf Ord|
|00001900| 65 72 7d 20 73 6c 6f 74 | 73 20 61 72 65 20 75 73 |er} slot|s are us|
|00001910| 65 64 20 74 6f 20 68 6f | 6c 64 20 74 68 65 20 6e |ed to ho|ld the n|
|00001920| 75 6d 62 65 72 20 6f 66 | 0a 63 6f 6e 74 72 6f 6c |umber of|.control|
|00001930| 20 70 6f 69 6e 74 73 20 | 69 6e 20 74 68 65 20 6d | points |in the m|
|00001940| 65 73 68 20 61 6e 64 20 | 6f 72 20 63 6f 6e 74 72 |esh and |or contr|
|00001950| 6f 6c 20 70 6f 6c 79 67 | 6f 6e 20 61 6e 64 20 74 |ol polyg|on and t|
|00001960| 68 65 20 6f 72 64 65 72 | 28 73 29 20 6f 66 0a 74 |he order|(s) of.t|
|00001970| 68 65 20 62 61 73 69 73 | 20 66 75 6e 63 74 69 6f |he basis| functio|
|00001980| 6e 73 2e 20 7b 5c 62 66 | 20 50 65 72 69 6f 64 69 |ns. {\bf| Periodi|
|00001990| 63 7d 20 66 6c 61 67 28 | 73 29 20 61 72 65 20 75 |c} flag(|s) are u|
|000019a0| 73 65 64 20 74 6f 20 64 | 65 6e 6f 74 65 0a 70 65 |sed to d|enote.pe|
|000019b0| 72 69 6f 64 69 63 20 65 | 6e 64 20 63 6f 6e 64 69 |riodic e|nd condi|
|000019c0| 74 69 6f 6e 73 2e 20 49 | 6e 20 61 64 64 69 74 69 |tions. I|n additi|
|000019d0| 6f 6e 2c 20 7b 5c 62 66 | 20 4b 6e 6f 74 56 65 63 |on, {\bf| KnotVec|
|000019e0| 74 6f 72 7d 20 73 6c 6f | 74 28 73 29 20 61 72 65 |tor} slo|t(s) are|
|000019f0| 0a 75 73 65 64 20 69 66 | 20 74 68 65 20 65 6e 74 |.used if| the ent|
|00001a00| 69 74 79 20 65 78 70 6c | 6f 69 74 73 20 42 73 70 |ity expl|oits Bsp|
|00001a10| 6c 69 6e 65 20 62 61 73 | 69 73 20 66 75 6e 63 74 |line bas|is funct|
|00001a20| 69 6f 6e 73 2c 20 6f 72 | 20 4e 55 4c 4c 0a 6f 74 |ions, or| NULL.ot|
|00001a30| 68 65 72 77 69 73 65 2e | 0a 0a 54 68 65 20 63 6f |herwise.|..The co|
|00001a40| 6e 74 72 6f 6c 20 70 6f | 6c 79 67 6f 6e 20 61 6e |ntrol po|lygon an|
|00001a50| 64 2f 6f 72 20 6d 65 73 | 68 20 69 74 73 65 6c 66 |d/or mes|h itself|
|00001a60| 20 69 73 20 6f 72 67 61 | 6e 69 7a 65 64 20 69 6e | is orga|nized in|
|00001a70| 20 74 68 65 20 7b 5c 62 | 66 0a 50 6f 69 6e 74 73 | the {\b|f.Points|
|00001a80| 7d 20 73 6c 6f 74 20 61 | 73 20 61 20 76 65 63 74 |} slot a|s a vect|
|00001a90| 6f 72 20 6f 66 20 73 69 | 7a 65 20 7b 5c 62 66 20 |or of si|ze {\bf |
|00001aa0| 43 41 47 44 5c 5f 4d 41 | 58 5c 5f 50 54 5c 5f 53 |CAGD\_MA|X\_PT\_S|
|00001ab0| 49 5a 45 7d 20 6f 66 20 | 76 65 63 74 6f 72 73 0a |IZE} of |vectors.|
|00001ac0| 6f 66 20 7b 5c 62 66 20 | 43 61 67 64 52 54 79 70 |of {\bf |CagdRTyp|
|00001ad0| 65 7d 73 2e 20 46 6f 72 | 20 73 75 72 66 61 63 65 |e}s. For| surface|
|00001ae0| 73 2c 20 74 68 65 20 6d | 65 73 68 20 69 73 20 6f |s, the m|esh is o|
|00001af0| 72 64 65 72 65 64 20 55 | 20 66 69 72 73 74 20 61 |rdered U| first a|
|00001b00| 6e 64 20 74 68 65 0a 6d | 61 63 72 6f 73 20 6f 66 |nd the.m|acros of|
|00001b10| 20 7b 5c 62 66 20 43 41 | 47 44 5c 5f 4e 45 58 54 | {\bf CA|GD\_NEXT|
|00001b20| 5c 5f 55 7d 20 7b 5c 62 | 66 20 43 41 47 44 5c 5f |\_U} {\b|f CAGD\_|
|00001b30| 4e 45 58 54 5c 5f 56 7d | 2c 20 61 6e 64 20 7b 5c |NEXT\_V}|, and {\|
|00001b40| 62 66 0a 43 41 47 44 5c | 5f 4d 45 53 48 5c 5f 55 |bf.CAGD\|_MESH\_U|
|00001b50| 56 7d 20 63 61 6e 20 62 | 65 20 75 73 65 64 20 74 |V} can b|e used t|
|00001b60| 6f 20 64 65 74 65 72 6d | 69 6e 65 20 69 6e 64 69 |o determ|ine indi|
|00001b70| 63 65 73 20 69 6e 20 74 | 68 65 20 6d 65 73 68 2e |ces in t|he mesh.|
|00001b80| 0a 0a 41 6c 6c 20 73 74 | 72 75 63 74 75 72 65 73 |..All st|ructures|
|00001b90| 20 69 6e 20 74 68 65 20 | 63 61 67 64 20 6c 69 62 | in the |cagd lib|
|00001ba0| 72 61 72 79 20 63 61 6e | 20 62 65 20 61 6c 6c 6f |rary can| be allo|
|00001bb0| 63 61 74 65 64 20 75 73 | 69 6e 67 20 4e 65 77 0a |cated us|ing New.|
|00001bc0| 63 6f 6e 73 74 72 63 75 | 74 75 72 65 73 20 28 69 |constrcu|tures (i|
|00001bd0| 2e 65 2e 20 7b 5c 62 66 | 20 43 61 67 64 55 56 4e |.e. {\bf| CagdUVN|
|00001be0| 65 77 7d 20 6f 72 20 7b | 5c 62 66 20 43 61 67 64 |ew} or {|\bf Cagd|
|00001bf0| 43 72 66 4e 65 77 7d 2c | 20 66 72 65 65 64 20 75 |CrfNew},| freed u|
|00001c00| 73 69 6e 67 0a 46 72 65 | 65 20 64 65 73 74 72 75 |sing.Fre|e destru|
|00001c10| 63 74 6f 72 65 73 20 28 | 69 2e 65 2e 20 7b 5c 62 |ctores (|i.e. {\b|
|00001c20| 66 20 43 61 67 64 53 72 | 66 46 72 65 65 7d 20 6f |f CagdSr|fFree} o|
|00001c30| 72 20 7b 43 61 67 64 42 | 42 6f 78 46 72 65 65 7d |r {CagdB|BoxFree}|
|00001c40| 2c 20 6c 69 6e 6b 65 64 | 0a 6c 69 73 74 20 66 72 |, linked|.list fr|
|00001c50| 65 65 20 75 73 69 6e 67 | 20 46 72 65 65 4c 69 73 |ee using| FreeLis|
|00001c60| 74 20 64 65 73 74 72 75 | 63 74 6f 72 65 73 20 28 |t destru|ctores (|
|00001c70| 69 2e 65 2e 20 7b 5c 62 | 66 0a 43 61 67 64 50 6f |i.e. {\b|f.CagdPo|
|00001c80| 6c 79 6c 69 6e 65 46 72 | 65 65 4c 69 73 74 7d 29 |lylineFr|eeList})|
|00001c90| 2c 20 61 6e 64 20 63 6f | 70 69 65 64 20 75 73 69 |, and co|pied usi|
|00001ca0| 6e 67 20 63 6f 70 79 20 | 63 6f 6e 73 74 72 75 63 |ng copy |construc|
|00001cb0| 74 6f 72 65 73 20 7b 69 | 2e 65 2e 20 7b 5c 62 66 |tores {i|.e. {\bf|
|00001cc0| 0a 43 61 67 64 50 74 43 | 6f 70 79 7d 20 6f 72 20 |.CagdPtC|opy} or |
|00001cd0| 7b 5c 62 66 20 43 61 67 | 64 43 74 6c 50 74 43 6f |{\bf Cag|dCtlPtCo|
|00001ce0| 70 79 4c 69 73 74 7d 29 | 2e 0a 0a 54 68 69 73 20 |pyList})|...This |
|00001cf0| 6c 69 62 72 61 72 79 20 | 68 61 73 20 69 74 73 20 |library |has its |
|00001d00| 6f 77 6e 20 65 72 72 6f | 72 20 68 61 6e 64 6c 65 |own erro|r handle|
|00001d10| 72 2c 20 77 68 69 63 68 | 20 62 79 20 64 65 66 61 |r, which| by defa|
|00001d20| 75 6c 74 20 70 72 69 6e | 74 73 20 61 6e 0a 65 72 |ult prin|ts an.er|
|00001d30| 72 6f 72 20 6d 65 73 73 | 61 67 65 20 61 6e 64 20 |ror mess|age and |
|00001d40| 65 78 69 74 20 74 68 65 | 20 70 72 6f 67 72 61 6d |exit the| program|
|00001d50| 20 63 61 6c 6c 65 64 20 | 7b 5c 62 66 20 43 61 67 | called |{\bf Cag|
|00001d60| 64 46 61 74 61 6c 45 72 | 72 6f 72 7d 2e 0a 0a 4d |dFatalEr|ror}...M|
|00001d70| 6f 73 74 20 67 6c 6f 62 | 61 6c 73 20 69 6e 20 74 |ost glob|als in t|
|00001d80| 68 69 73 20 6c 69 62 72 | 61 72 79 20 68 61 76 65 |his libr|ary have|
|00001d90| 20 61 20 70 72 65 66 69 | 78 20 6f 66 20 7b 5c 62 | a prefi|x of {\b|
|00001da0| 66 20 43 61 67 64 7d 20 | 66 6f 72 20 67 65 6e 65 |f Cagd} |for gene|
|00001db0| 72 61 6c 0a 63 61 67 64 | 20 72 6f 75 74 69 6e 65 |ral.cagd| routine|
|00001dc0| 73 2e 20 50 72 65 66 69 | 78 20 6f 66 20 7b 5c 62 |s. Prefi|x of {\b|
|00001dd0| 66 20 42 7a 72 7d 20 69 | 73 20 75 73 65 64 20 66 |f Bzr} i|s used f|
|00001de0| 6f 72 20 42 65 7a 69 65 | 72 20 72 6f 75 74 69 6e |or Bezie|r routin|
|00001df0| 65 73 2c 20 70 72 65 66 | 69 78 0a 6f 66 20 7b 5c |es, pref|ix.of {\|
|00001e00| 62 66 20 42 73 70 7d 20 | 66 6f 72 20 42 73 70 6c |bf Bsp} |for Bspl|
|00001e10| 69 6e 65 20 73 70 65 63 | 69 66 69 63 20 72 6f 75 |ine spec|ific rou|
|00001e20| 74 69 6e 65 73 2c 20 70 | 72 65 66 69 78 20 6f 66 |tines, p|refix of|
|00001e30| 20 7b 5c 62 66 20 43 6e | 76 72 74 7d 20 66 6f 72 | {\bf Cn|vrt} for|
|00001e40| 0a 63 6f 6e 76 65 72 73 | 69 6f 6e 20 72 6f 75 74 |.convers|ion rout|
|00001e50| 69 6e 65 73 2c 20 61 6e | 64 20 7b 5c 62 66 20 41 |ines, an|d {\bf A|
|00001e60| 66 64 7d 20 66 6f 72 20 | 61 64 61 70 74 69 76 65 |fd} for |adaptive|
|00001e70| 20 66 6f 72 77 61 72 64 | 20 64 69 66 66 65 72 65 | forward| differe|
|00001e80| 6e 63 69 6e 67 0a 72 6f | 75 74 69 6e 65 73 2e 0a |ncing.ro|utines..|
|00001e90| 0a 5c 73 65 63 74 69 6f | 6e 7b 4c 69 62 72 61 72 |.\sectio|n{Librar|
|00001ea0| 79 20 46 75 6e 63 74 69 | 6f 6e 73 7d 0a 5c 69 6e |y Functi|ons}.\in|
|00001eb0| 70 75 74 7b 70 72 6f 67 | 5f 6d 61 6e 2f 63 61 67 |put{prog|_man/cag|
|00001ec0| 64 5f 6c 69 62 2e 74 65 | 78 7d 0a 0a 25 25 25 25 |d_lib.te|x}..%%%%|
|00001ed0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001ee0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001ef0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001f00| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00001f10| 25 25 25 25 25 25 25 25 | 25 0a 5c 63 68 61 70 74 |%%%%%%%%|%.\chapt|
|00001f20| 65 72 7b 47 65 6f 6d 65 | 74 72 79 20 4c 69 62 72 |er{Geome|try Libr|
|00001f30| 61 72 79 2c 20 67 65 6f | 6d 5c 5f 6c 69 62 7d 0a |ary, geo|m\_lib}.|
|00001f40| 0a 5c 73 65 63 74 69 6f | 6e 7b 47 65 6e 65 72 61 |.\sectio|n{Genera|
|00001f50| 6c 20 49 6e 66 6f 72 6d | 61 74 69 6f 6e 7d 0a 0a |l Inform|ation}..|
|00001f60| 54 68 69 73 20 6c 69 62 | 72 61 72 79 20 68 61 6e |This lib|rary han|
|00001f70| 64 6c 65 73 20 67 65 6e | 65 72 61 6c 20 67 65 6f |dles gen|eral geo|
|00001f80| 6d 65 74 72 69 63 20 71 | 75 65 72 69 65 73 20 73 |metric q|ueries s|
|00001f90| 75 63 68 20 61 73 20 61 | 20 64 69 73 74 61 6e 63 |uch as a| distanc|
|00001fa0| 65 20 62 65 74 77 65 65 | 6e 0a 74 77 6f 20 6c 69 |e betwee|n.two li|
|00001fb0| 6e 65 73 2c 20 62 6f 75 | 6e 64 69 6e 67 20 62 6f |nes, bou|nding bo|
|00001fc0| 78 65 73 2c 20 63 6f 6e | 76 65 78 69 74 79 20 6f |xes, con|vexity o|
|00001fd0| 66 20 70 6f 6c 79 67 6f | 6e 73 20 65 74 63 2e 20 |f polygo|ns etc. |
|00001fe0| 53 65 76 65 72 61 6c 20 | 68 65 61 64 65 72 0a 66 |Several |header.f|
|00001ff0| 69 6c 65 73 20 63 61 6e | 20 62 65 20 66 6f 75 6e |iles can| be foun|
|00002000| 64 20 66 6f 72 20 74 68 | 69 73 20 6c 69 62 72 61 |d for th|is libra|
|00002010| 72 79 3a 0a 5c 62 65 67 | 69 6e 7b 63 65 6e 74 65 |ry:.\beg|in{cente|
|00002020| 72 7d 0a 5c 62 65 67 69 | 6e 7b 74 61 62 75 6c 61 |r}.\begi|n{tabula|
|00002030| 72 7d 7b 7c 7c 63 7c 63 | 7c 7c 7d 20 5c 68 6c 69 |r}{||c|c|||} \hli|
|00002040| 6e 65 0a 20 20 20 20 48 | 65 61 64 65 72 20 28 69 |ne. H|eader (i|
|00002050| 6e 63 6c 75 64 65 2f 2a | 2e 68 29 20 26 20 46 75 |nclude/*|.h) & Fu|
|00002060| 6e 63 74 69 6f 6e 61 6c | 69 74 79 20 5c 5c 20 5c |nctional|ity \\ \|
|00002070| 68 6c 69 6e 65 20 0a 20 | 20 20 20 62 62 6f 78 2e |hline . | bbox.|
|00002080| 68 20 20 20 20 20 26 20 | 42 6f 75 6e 64 69 6e 67 |h & |Bounding|
|00002090| 20 62 6f 78 65 73 20 72 | 65 6c 61 74 65 64 20 66 | boxes r|elated f|
|000020a0| 75 6e 63 74 69 6f 6e 73 | 20 5c 5c 0a 20 20 20 20 |unctions| \\. |
|000020b0| 63 6f 6e 76 65 78 2e 68 | 20 20 20 26 20 43 6f 6e |convex.h| & Con|
|000020c0| 76 65 78 69 74 79 20 6f | 66 20 70 6f 6c 79 67 6f |vexity o|f polygo|
|000020d0| 6e 73 20 61 6e 64 20 63 | 6f 6e 76 65 78 20 70 6f |ns and c|onvex po|
|000020e0| 6c 79 67 6f 6e 20 64 65 | 63 6f 6d 70 6f 73 69 74 |lygon de|composit|
|000020f0| 69 6f 6e 20 5c 5c 0a 20 | 20 20 20 67 65 6f 6d 61 |ion \\. | geoma|
|00002100| 74 33 64 2e 68 20 26 20 | 47 65 6e 65 72 61 6c 20 |t3d.h & |General |
|00002110| 74 68 72 65 65 20 64 69 | 6d 65 6e 73 69 6f 6e 61 |three di|mensiona|
|00002120| 6c 20 67 65 6f 6d 65 74 | 72 79 20 71 75 65 72 69 |l geomet|ry queri|
|00002130| 65 73 20 5c 5c 0a 20 20 | 20 20 67 65 6f 6d 76 61 |es \\. | geomva|
|00002140| 6c 73 2e 68 20 26 20 41 | 72 65 61 2c 20 56 6f 6c |ls.h & A|rea, Vol|
|00002150| 75 6d 65 2c 20 61 6e 64 | 20 53 69 7a 65 20 71 75 |ume, and| Size qu|
|00002160| 65 72 69 65 73 20 6f 6e | 20 70 6f 6c 79 67 6f 6e |eries on| polygon|
|00002170| 61 6c 20 6f 62 6a 65 63 | 74 73 20 5c 5c 0a 20 20 |al objec|ts \\. |
|00002180| 20 20 69 6e 74 72 6e 72 | 6d 6c 2e 68 20 26 20 49 | intrnr|ml.h & I|
|00002190| 6e 74 65 72 6e 61 6c 20 | 6e 6f 72 6d 61 6c 20 69 |nternal |normal i|
|000021a0| 6e 74 65 72 70 6f 6c 61 | 74 69 6f 6e 20 66 6f 72 |nterpola|tion for|
|000021b0| 20 70 6f 6c 79 67 6f 6e | 61 6c 20 6d 6f 64 65 6c | polygon|al model|
|000021c0| 73 20 5c 5c 0a 20 20 20 | 20 6c 6e 5c 5f 73 77 65 |s \\. | ln\_swe|
|000021d0| 65 70 2e 68 20 26 20 41 | 20 6c 69 6e 65 20 73 77 |ep.h & A| line sw|
|000021e0| 65 65 70 20 69 6d 70 6c | 65 6d 65 74 61 74 69 6f |eep impl|emetatio|
|000021f0| 6e 20 5c 5c 0a 20 20 20 | 20 70 6f 6c 79 5c 5f 63 |n \\. | poly\_c|
|00002200| 6c 6e 2e 68 20 26 20 43 | 6c 65 61 6e 20 75 70 20 |ln.h & C|lean up |
|00002210| 64 65 67 65 6e 65 72 61 | 74 65 64 20 70 6f 6c 79 |degenera|ted poly|
|00002220| 67 6f 6e 73 2f 70 6f 6c | 79 6c 69 6e 65 73 20 5c |gons/pol|ylines \|
|00002230| 5c 0a 20 20 20 20 70 72 | 69 6d 69 74 69 76 2e 68 |\. pr|imitiv.h|
|00002240| 20 26 20 43 6f 6e 73 74 | 72 75 63 74 6f 72 73 20 | & Const|ructors |
|00002250| 6f 66 20 70 6f 6c 79 67 | 6f 6e 61 6c 20 42 4f 58 |of polyg|onal BOX|
|00002260| 65 73 2c 20 43 59 4c 49 | 4e 44 45 52 73 2c 20 65 |es, CYLI|NDERs, e|
|00002270| 74 63 2e 20 5c 5c 20 5c | 68 6c 69 6e 65 0a 5c 65 |tc. \\ \|hline.\e|
|00002280| 6e 64 7b 74 61 62 75 6c | 61 72 7d 0a 5c 65 6e 64 |nd{tabul|ar}.\end|
|00002290| 7b 63 65 6e 74 65 72 7d | 0a 0a 5c 73 65 63 74 69 |{center}|..\secti|
|000022a0| 6f 6e 7b 4c 69 62 72 61 | 72 79 20 46 75 6e 63 74 |on{Libra|ry Funct|
|000022b0| 69 6f 6e 73 7d 0a 5c 69 | 6e 70 75 74 7b 70 72 6f |ions}.\i|nput{pro|
|000022c0| 67 5f 6d 61 6e 2f 67 65 | 6f 6d 5f 6c 69 62 2e 74 |g_man/ge|om_lib.t|
|000022d0| 65 78 7d 0a 0a 25 25 25 | 25 25 25 25 25 25 25 25 |ex}..%%%|%%%%%%%%|
|000022e0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000022f0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002300| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002310| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002320| 25 25 0a 5c 63 68 61 70 | 74 65 72 7b 4d 69 73 63 |%%.\chap|ter{Misc|
|00002330| 65 6c 6c 65 6e 65 6f 75 | 73 20 4c 69 62 72 61 72 |elleneou|s Librar|
|00002340| 79 2c 20 6d 69 73 63 5c | 5f 6c 69 62 7d 0a 0a 5c |y, misc\|_lib}..\|
|00002350| 73 65 63 74 69 6f 6e 7b | 47 65 6e 65 72 61 6c 20 |section{|General |
|00002360| 49 6e 66 6f 72 6d 61 74 | 69 6f 6e 7d 0a 0a 54 68 |Informat|ion}..Th|
|00002370| 69 73 20 6c 69 62 72 61 | 72 79 20 68 6f 6c 64 73 |is libra|ry holds|
|00002380| 20 67 65 6e 65 72 61 6c | 20 6d 69 73 63 65 6c 6c | general| miscell|
|00002390| 65 6e 65 6f 75 73 20 66 | 75 6e 63 74 69 6f 6e 73 |eneous f|unctions|
|000023a0| 20 73 75 63 68 20 61 73 | 20 72 65 61 64 69 6e 67 | such as| reading|
|000023b0| 0a 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 66 |.configu|ration f|
|000023c0| 69 6c 65 73 2c 20 6c 6f | 77 20 6c 65 76 65 6c 20 |iles, lo|w level |
|000023d0| 68 6f 6d 6f 67 65 6e 65 | 6f 75 73 20 6d 61 74 72 |homogene|ous matr|
|000023e0| 69 63 65 73 20 63 6f 6d | 70 75 74 61 74 69 6f 6e |ices com|putation|
|000023f0| 2c 20 6c 6f 77 0a 6c 65 | 76 65 6c 20 61 74 74 72 |, low.le|vel attr|
|00002400| 69 62 75 74 65 73 20 61 | 6e 64 20 67 65 6e 65 72 |ibutes a|nd gener|
|00002410| 61 6c 20 6d 61 63 68 69 | 6e 65 20 73 70 65 63 69 |al machi|ne speci|
|00002420| 66 69 63 20 6c 6f 77 20 | 6c 65 76 65 6c 20 72 6f |fic low |level ro|
|00002430| 75 74 69 6e 65 73 2e 0a | 53 65 76 65 72 61 6c 20 |utines..|Several |
|00002440| 68 65 61 64 65 72 20 66 | 69 6c 65 73 20 63 61 6e |header f|iles can|
|00002450| 20 62 65 20 66 6f 75 6e | 64 20 66 6f 72 20 74 68 | be foun|d for th|
|00002460| 69 73 20 6c 69 62 72 61 | 72 79 3a 0a 5c 62 65 67 |is libra|ry:.\beg|
|00002470| 69 6e 7b 63 65 6e 74 65 | 72 7d 0a 5c 62 65 67 69 |in{cente|r}.\begi|
|00002480| 6e 7b 74 61 62 75 6c 61 | 72 7d 7b 7c 7c 63 7c 63 |n{tabula|r}{||c|c|
|00002490| 7c 7c 7d 20 5c 68 6c 69 | 6e 65 0a 20 20 20 20 48 |||} \hli|ne. H|
|000024a0| 65 61 64 65 72 20 28 69 | 6e 63 6c 75 64 65 2f 2a |eader (i|nclude/*|
|000024b0| 2e 68 29 20 26 20 46 75 | 6e 63 74 69 6f 6e 61 6c |.h) & Fu|nctional|
|000024c0| 69 74 79 20 5c 5c 20 5c | 68 6c 69 6e 65 0a 20 20 |ity \\ \|hline. |
|000024d0| 20 20 63 6f 6e 66 69 67 | 2e 68 20 20 20 26 20 4d | config|.h & M|
|000024e0| 61 6e 69 70 75 6c 61 74 | 69 6f 6e 20 6f 66 20 63 |anipulat|ion of c|
|000024f0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 66 69 6c |onfigura|tion fil|
|00002500| 65 73 20 28 2a 2e 63 66 | 67 20 66 69 6c 65 73 29 |es (*.cf|g files)|
|00002510| 20 5c 5c 0a 20 20 20 20 | 64 69 73 74 5c 5f 70 74 | \\. |dist\_pt|
|00002520| 73 2e 68 20 26 20 45 6e | 65 67 72 79 20 62 61 73 |s.h & En|egry bas|
|00002530| 65 64 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |ed distr|ibution |
|00002540| 6f 66 20 70 6f 69 6e 74 | 73 2e 20 5c 5c 0a 20 20 |of point|s. \\. |
|00002550| 20 20 67 65 6e 5c 5f 6d | 61 74 2e 68 20 20 26 20 | gen\_m|at.h & |
|00002560| 48 6f 6d 6f 67 65 6e 65 | 6f 75 73 20 6d 61 74 72 |Homogene|ous matr|
|00002570| 69 63 65 73 20 6d 61 6e | 69 70 75 6c 61 74 69 6f |ices man|ipulatio|
|00002580| 6e 20 5c 5c 0a 20 20 20 | 20 67 65 74 61 72 67 2e |n \\. | getarg.|
|00002590| 68 20 20 20 26 20 43 6f | 6d 6d 61 6e 64 20 6c 69 |h & Co|mmand li|
|000025a0| 6e 65 20 70 61 72 73 69 | 6e 67 20 66 6f 72 20 61 |ne parsi|ng for a|
|000025b0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 6f 6f 6c 73 |pplicati|on tools|
|000025c0| 20 5c 5c 0a 20 20 20 20 | 69 6d 61 6c 6c 6f 63 2e | \\. |imalloc.|
|000025d0| 68 20 20 26 20 4c 6f 77 | 20 6c 65 76 65 6c 20 64 |h & Low| level d|
|000025e0| 79 6e 61 6d 69 63 20 6d | 65 6d 6f 72 79 20 66 75 |ynamic m|emory fu|
|000025f0| 6e 63 74 69 6f 6e 73 20 | 66 6f 72 20 49 52 49 54 |nctions |for IRIT|
|00002600| 20 5c 5c 0a 20 20 20 20 | 6d 69 73 63 61 74 74 72 | \\. |miscattr|
|00002610| 2e 68 20 26 20 4c 6f 77 | 20 6c 65 76 65 6c 20 61 |.h & Low| level a|
|00002620| 74 74 72 69 62 75 74 65 | 20 72 65 6c 61 74 65 64 |ttribute| related|
|00002630| 20 66 75 6e 63 74 69 6f | 6e 73 20 5c 5c 0a 20 20 | functio|ns \\. |
|00002640| 20 20 70 72 69 6f 72 71 | 75 65 2e 68 20 26 20 41 | priorq|ue.h & A|
|00002650| 6e 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |n implem|entation|
|00002660| 20 6f 66 20 61 20 70 72 | 69 6f 72 69 74 79 20 71 | of a pr|iority q|
|00002670| 75 65 75 65 20 5c 5c 0a | 20 20 20 20 78 67 65 6e |ueue \\.| xgen|
|00002680| 65 72 61 6c 2e 68 20 26 | 20 4c 6f 77 20 6c 65 76 |eral.h &| Low lev|
|00002690| 65 6c 2c 20 6d 61 63 68 | 69 6e 65 20 73 70 65 63 |el, mach|ine spec|
|000026a0| 69 66 69 63 2c 20 72 6f | 75 74 69 6e 65 73 20 5c |ific, ro|utines \|
|000026b0| 5c 20 5c 68 6c 69 6e 65 | 0a 5c 65 6e 64 7b 74 61 |\ \hline|.\end{ta|
|000026c0| 62 75 6c 61 72 7d 0a 5c | 65 6e 64 7b 63 65 6e 74 |bular}.\|end{cent|
|000026d0| 65 72 7d 0a 0a 5c 73 65 | 63 74 69 6f 6e 7b 4c 69 |er}..\se|ction{Li|
|000026e0| 62 72 61 72 79 20 46 75 | 6e 63 74 69 6f 6e 73 7d |brary Fu|nctions}|
|000026f0| 0a 5c 69 6e 70 75 74 7b | 70 72 6f 67 5f 6d 61 6e |.\input{|prog_man|
|00002700| 2f 6d 69 73 63 5f 6c 69 | 62 2e 74 65 78 7d 0a 0a |/misc_li|b.tex}..|
|00002710| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002720| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002730| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002740| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002750| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 0a 5c 63 |%%%%%%%%|%%%%%.\c|
|00002760| 68 61 70 74 65 72 7b 50 | 72 73 72 20 4c 69 62 72 |hapter{P|rsr Libr|
|00002770| 61 72 79 2c 20 70 72 73 | 72 5c 5f 6c 69 62 7d 0a |ary, prs|r\_lib}.|
|00002780| 0a 5c 73 65 63 74 69 6f | 6e 7b 47 65 6e 65 72 61 |.\sectio|n{Genera|
|00002790| 6c 20 49 6e 66 6f 72 6d | 61 74 69 6f 6e 7d 0a 0a |l Inform|ation}..|
|000027a0| 54 68 69 73 20 6c 69 62 | 72 61 72 79 20 70 72 6f |This lib|rary pro|
|000027b0| 76 69 64 65 73 20 74 68 | 65 20 64 61 74 61 20 66 |vides th|e data f|
|000027c0| 69 6c 65 20 69 6e 74 65 | 72 66 61 63 65 20 66 6f |ile inte|rface fo|
|000027d0| 72 20 49 52 49 54 2e 20 | 46 75 6e 63 74 69 6f 6e |r IRIT. |Function|
|000027e0| 73 20 61 72 65 0a 70 72 | 6f 76 69 64 65 64 20 74 |s are.pr|ovided t|
|000027f0| 6f 20 72 65 61 64 20 61 | 6e 64 20 77 72 69 74 65 |o read a|nd write|
|00002800| 20 64 61 74 61 20 66 69 | 6c 65 73 2c 20 62 6f 74 | data fi|les, bot|
|00002810| 68 20 63 6f 6d 70 72 65 | 73 73 65 64 20 28 6f 6e |h compre|ssed (on|
|00002820| 20 75 6e 69 78 20 6f 6e | 6c 79 2c 0a 75 73 69 6e | unix on|ly,.usin|
|00002830| 67 20 7b 5c 65 6d 20 63 | 6f 6d 70 72 65 73 73 7d |g {\em c|ompress}|
|00002840| 29 2c 20 61 6e 64 20 75 | 6e 63 6f 6d 70 72 65 73 |), and u|ncompres|
|00002850| 73 65 64 2c 20 69 6e 20 | 62 69 6e 61 72 79 20 61 |sed, in |binary a|
|00002860| 6e 64 2f 6f 72 20 61 73 | 63 69 69 20 74 65 78 74 |nd/or as|cii text|
|00002870| 0a 6d 6f 64 65 73 2e 20 | 54 68 69 73 20 6c 69 62 |.modes. |This lib|
|00002880| 72 61 72 79 20 69 73 20 | 61 6c 73 6f 20 75 73 65 |rary is |also use|
|00002890| 64 20 74 6f 20 65 78 63 | 68 61 6e 67 65 20 64 61 |d to exc|hange da|
|000028a0| 74 61 20 62 65 74 77 65 | 65 6e 20 74 68 65 20 49 |ta betwe|en the I|
|000028b0| 52 49 54 0a 73 65 72 76 | 65 72 20 61 6e 64 20 74 |RIT.serv|er and t|
|000028c0| 68 65 20 64 69 73 70 6c | 61 79 20 64 65 76 69 63 |he displ|ay devic|
|000028d0| 65 73 27 20 63 6c 69 65 | 6e 74 73 2e 20 20 53 65 |es' clie|nts. Se|
|000028e0| 76 65 72 61 6c 20 68 65 | 61 64 65 72 20 66 69 6c |veral he|ader fil|
|000028f0| 65 73 20 63 61 6e 20 62 | 65 0a 66 6f 75 6e 64 20 |es can b|e.found |
|00002900| 66 6f 72 20 74 68 69 73 | 20 6c 69 62 72 61 72 79 |for this| library|
|00002910| 3a 0a 5c 62 65 67 69 6e | 7b 63 65 6e 74 65 72 7d |:.\begin|{center}|
|00002920| 0a 5c 62 65 67 69 6e 7b | 74 61 62 75 6c 61 72 7d |.\begin{|tabular}|
|00002930| 7b 7c 7c 63 7c 63 7c 7c | 7d 20 5c 68 6c 69 6e 65 |{||c|c|||} \hline|
|00002940| 0a 20 20 20 20 48 65 61 | 64 65 72 20 28 69 6e 63 |. Hea|der (inc|
|00002950| 6c 75 64 65 2f 2a 2e 68 | 29 20 26 20 46 75 6e 63 |lude/*.h|) & Func|
|00002960| 74 69 6f 6e 61 6c 69 74 | 79 20 5c 5c 20 5c 68 6c |tionalit|y \\ \hl|
|00002970| 69 6e 65 0a 20 20 20 20 | 61 6c 6c 6f 63 61 74 65 |ine. |allocate|
|00002980| 2e 68 20 26 20 48 69 67 | 68 20 6c 65 76 65 6c 20 |.h & Hig|h level |
|00002990| 64 79 6e 61 6d 69 63 20 | 61 6c 6c 6f 63 61 74 69 |dynamic |allocati|
|000029a0| 6f 6e 20 6f 66 20 6f 62 | 6a 65 63 74 73 20 5c 5c |on of ob|jects \\|
|000029b0| 0a 20 20 20 20 61 74 74 | 72 69 62 75 74 2e 68 20 |. att|ribut.h |
|000029c0| 26 20 48 69 67 68 20 6c | 65 76 65 6c 20 61 74 74 |& High l|evel att|
|000029d0| 72 69 62 75 74 65 73 20 | 66 6f 72 20 6f 62 6a 65 |ributes |for obje|
|000029e0| 63 74 73 20 5c 5c 0a 20 | 20 20 20 69 70 5c 5f 63 |cts \\. | ip\_c|
|000029f0| 6e 76 72 74 2e 68 20 26 | 20 46 72 65 65 66 6f 72 |nvrt.h &| Freefor|
|00002a00| 6d 20 74 6f 20 70 6f 6c | 79 67 6f 6e 20 61 6e 64 |m to pol|ygon and|
|00002a10| 20 70 6f 6c 79 6c 69 6e | 65 20 68 69 67 68 20 6c | polylin|e high l|
|00002a20| 65 76 65 6c 20 63 6f 6e | 76 65 72 73 69 6f 6e 20 |evel con|version |
|00002a30| 5c 5c 0a 20 20 20 20 69 | 72 69 74 70 72 73 72 2e |\\. i|ritprsr.|
|00002a40| 68 20 26 20 4d 61 69 6e | 20 69 6e 74 65 72 66 61 |h & Main| interfa|
|00002a50| 63 65 20 74 6f 20 72 65 | 61 64 69 6e 67 20 61 6e |ce to re|ading an|
|00002a60| 64 20 77 72 69 74 69 6e | 67 20 64 61 74 61 20 5c |d writin|g data \|
|00002a70| 5c 0a 20 20 20 20 69 72 | 69 74 5c 5f 73 6f 63 2e |\. ir|it\_soc.|
|00002a80| 68 20 26 20 53 6f 63 6b | 65 74 20 63 6f 6d 6d 75 |h & Sock|et commu|
|00002a90| 6e 69 63 61 74 69 6f 6e | 20 66 6f 72 20 64 61 74 |nication| for dat|
|00002aa0| 61 20 65 78 63 68 61 6e | 67 65 20 5c 5c 20 5c 68 |a exchan|ge \\ \h|
|00002ab0| 6c 69 6e 65 0a 5c 65 6e | 64 7b 74 61 62 75 6c 61 |line.\en|d{tabula|
|00002ac0| 72 7d 0a 5c 65 6e 64 7b | 63 65 6e 74 65 72 7d 0a |r}.\end{|center}.|
|00002ad0| 0a 5c 73 65 63 74 69 6f | 6e 7b 4c 69 62 72 61 72 |.\sectio|n{Librar|
|00002ae0| 79 20 46 75 6e 63 74 69 | 6f 6e 73 7d 0a 5c 69 6e |y Functi|ons}.\in|
|00002af0| 70 75 74 7b 70 72 6f 67 | 5f 6d 61 6e 2f 70 72 73 |put{prog|_man/prs|
|00002b00| 72 5f 6c 69 62 2e 74 65 | 78 7d 0a 0a 25 25 25 25 |r_lib.te|x}..%%%%|
|00002b10| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002b20| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002b30| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002b40| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002b50| 25 25 25 25 25 25 25 25 | 25 0a 5c 63 68 61 70 74 |%%%%%%%%|%.\chapt|
|00002b60| 65 72 7b 53 79 6d 62 6f | 6c 69 63 20 4c 69 62 72 |er{Symbo|lic Libr|
|00002b70| 61 72 79 2c 20 73 79 6d | 62 5c 5f 6c 69 62 7d 0a |ary, sym|b\_lib}.|
|00002b80| 0a 5c 73 65 63 74 69 6f | 6e 7b 47 65 6e 65 72 61 |.\sectio|n{Genera|
|00002b90| 6c 20 49 6e 66 6f 72 6d | 61 74 69 6f 6e 7d 0a 0a |l Inform|ation}..|
|00002ba0| 54 68 69 73 20 6c 69 62 | 72 61 72 79 20 70 72 6f |This lib|rary pro|
|00002bb0| 76 69 64 65 73 20 61 20 | 72 69 63 68 20 73 65 74 |vides a |rich set|
|00002bc0| 20 6f 66 20 66 75 6e 63 | 74 69 6f 6e 20 74 6f 20 | of func|tion to |
|00002bd0| 73 79 6d 62 6f 6c 69 63 | 61 6c 6c 79 20 6d 61 6e |symbolic|ally man|
|00002be0| 69 70 75 6c 61 74 65 0a | 66 72 65 65 66 6f 72 6d |ipulate.|freeform|
|00002bf0| 20 63 75 72 76 65 73 20 | 61 6e 64 20 73 75 72 66 | curves |and surf|
|00002c00| 61 63 65 73 2e 20 54 68 | 69 73 20 6c 69 62 72 61 |aces. Th|is libra|
|00002c10| 72 79 20 68 65 61 76 69 | 6c 79 20 64 65 70 65 6e |ry heavi|ly depen|
|00002c20| 64 73 20 6f 6e 20 74 68 | 65 20 63 61 67 64 0a 6c |ds on th|e cagd.l|
|00002c30| 69 62 72 61 72 79 2e 20 | 46 75 6e 63 74 69 6f 6e |ibrary. |Function|
|00002c40| 73 20 61 72 65 20 70 72 | 6f 76 69 64 65 64 20 74 |s are pr|ovided t|
|00002c50| 6f 20 6c 6f 77 20 6c 65 | 76 65 6c 20 61 64 64 2c |o low le|vel add,|
|00002c60| 20 73 75 62 74 72 61 63 | 74 2c 20 61 6e 64 20 6d | subtrac|t, and m|
|00002c70| 75 6c 74 69 70 6c 79 0a | 66 72 65 65 66 6f 72 6d |ultiply.|freeform|
|00002c80| 20 63 75 72 76 65 73 20 | 61 6e 64 20 73 75 72 66 | curves |and surf|
|00002c90| 61 63 65 73 2c 20 74 6f | 20 63 6f 6d 70 75 74 65 |aces, to| compute|
|00002ca0| 20 66 69 65 6c 64 73 20 | 73 75 63 68 20 61 73 20 | fields |such as |
|00002cb0| 63 75 72 76 61 74 75 72 | 65 2c 0a 61 6e 64 20 74 |curvatur|e,.and t|
|00002cc0| 6f 20 65 78 74 72 61 63 | 74 20 73 69 6e 67 75 6c |o extrac|t singul|
|00002cd0| 61 72 20 70 6f 69 6e 74 | 73 20 73 75 63 68 20 61 |ar point|s such a|
|00002ce0| 73 20 65 78 74 72 65 6d | 75 6d 73 2c 20 7a 65 72 |s extrem|ums, zer|
|00002cf0| 6f 73 2c 20 61 6e 64 20 | 69 6e 66 6c 65 63 74 69 |os, and |inflecti|
|00002d00| 6f 6e 73 2e 0a 48 69 67 | 68 20 6c 65 76 65 6c 20 |ons..Hig|h level |
|00002d10| 74 6f 6f 6c 73 20 74 6f | 20 6d 65 74 61 6d 6f 72 |tools to| metamor|
|00002d20| 70 68 20 63 75 72 76 65 | 73 20 61 6e 64 20 73 75 |ph curve|s and su|
|00002d30| 72 66 61 63 65 73 2c 20 | 74 6f 20 63 6f 6d 70 75 |rfaces, |to compu|
|00002d40| 74 65 20 6c 61 79 6f 75 | 74 20 28 70 72 69 73 61 |te layou|t (prisa|
|00002d50| 29 0a 6f 66 20 66 72 65 | 65 66 6f 72 6d 20 73 75 |).of fre|eform su|
|00002d60| 72 66 61 63 65 73 2c 20 | 74 6f 20 63 6f 6d 70 75 |rfaces, |to compu|
|00002d70| 74 65 20 6f 66 66 73 65 | 74 20 61 70 70 72 6f 78 |te offse|t approx|
|00002d80| 69 6d 61 74 69 6f 6e 73 | 20 6f 66 20 63 75 72 76 |imations| of curv|
|00002d90| 65 73 20 61 6e 64 0a 73 | 75 72 66 61 63 65 73 2c |es and.s|urfaces,|
|00002da0| 20 61 6e 64 20 74 6f 20 | 63 6f 6d 70 6f 73 65 20 | and to |compose |
|00002db0| 63 75 72 76 65 73 20 61 | 6e 64 20 73 75 72 66 61 |curves a|nd surfa|
|00002dc0| 63 65 73 20 61 72 65 20 | 61 6c 73 6f 20 70 72 6f |ces are |also pro|
|00002dd0| 76 69 64 65 64 2e 0a 0a | 54 68 65 20 69 6e 74 65 |vided...|The inte|
|00002de0| 72 66 61 63 65 20 6f 66 | 20 74 68 65 20 6c 69 62 |rface of| the lib|
|00002df0| 72 61 72 79 20 69 73 20 | 64 65 66 69 6e 65 64 20 |rary is |defined |
|00002e00| 69 6e 20 7b 5c 65 6d 20 | 69 6e 63 6c 75 64 65 2f |in {\em |include/|
|00002e10| 73 79 6d 62 5c 5f 6c 69 | 62 2e 68 7d 2e 20 0a 0a |symb\_li|b.h}. ..|
|00002e20| 54 68 69 73 20 6c 69 62 | 72 61 72 79 20 68 61 73 |This lib|rary has|
|00002e30| 20 69 74 73 20 6f 77 6e | 20 65 72 72 6f 72 20 68 | its own| error h|
|00002e40| 61 6e 64 6c 65 72 2c 20 | 77 68 69 63 68 20 62 79 |andler, |which by|
|00002e50| 20 64 65 66 61 75 6c 74 | 20 70 72 69 6e 74 73 20 | default| prints |
|00002e60| 61 6e 0a 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |an.error| message|
|00002e70| 20 61 6e 64 20 65 78 69 | 74 20 74 68 65 20 70 72 | and exi|t the pr|
|00002e80| 6f 67 72 61 6d 20 63 61 | 6c 6c 65 64 20 7b 5c 62 |ogram ca|lled {\b|
|00002e90| 66 20 53 79 6d 62 46 61 | 74 61 6c 45 72 72 6f 72 |f SymbFa|talError|
|00002ea0| 7d 2e 0a 0a 47 6c 6f 62 | 61 6c 73 20 69 6e 20 74 |}...Glob|als in t|
|00002eb0| 68 69 73 20 6c 69 62 72 | 61 72 79 20 68 61 76 65 |his libr|ary have|
|00002ec0| 20 61 20 70 72 65 66 69 | 78 20 6f 66 20 7b 5c 62 | a prefi|x of {\b|
|00002ed0| 66 20 53 79 6d 62 7d 20 | 66 6f 72 20 67 65 6e 65 |f Symb} |for gene|
|00002ee0| 72 61 6c 0a 73 79 6d 62 | 6f 6c 69 63 20 72 6f 75 |ral.symb|olic rou|
|00002ef0| 74 69 6e 65 73 2e 20 50 | 72 65 66 69 78 20 6f 66 |tines. P|refix of|
|00002f00| 20 7b 5c 62 66 20 42 7a | 72 7d 20 69 73 20 75 73 | {\bf Bz|r} is us|
|00002f10| 65 64 20 66 6f 72 20 42 | 65 7a 69 65 72 20 72 6f |ed for B|ezier ro|
|00002f20| 75 74 69 6e 65 73 2c 0a | 61 6e 64 20 70 72 65 66 |utines,.|and pref|
|00002f30| 69 78 20 6f 66 20 7b 5c | 62 66 20 42 73 70 7d 20 |ix of {\|bf Bsp} |
|00002f40| 66 6f 72 20 42 73 70 6c | 69 6e 65 20 73 70 65 63 |for Bspl|ine spec|
|00002f50| 69 66 69 63 20 72 6f 75 | 74 69 6e 65 73 2e 0a 0a |ific rou|tines...|
|00002f60| 5c 73 65 63 74 69 6f 6e | 7b 4c 69 62 72 61 72 79 |\section|{Library|
|00002f70| 20 46 75 6e 63 74 69 6f | 6e 73 7d 0a 5c 69 6e 70 | Functio|ns}.\inp|
|00002f80| 75 74 7b 70 72 6f 67 5f | 6d 61 6e 2f 73 79 6d 62 |ut{prog_|man/symb|
|00002f90| 5f 6c 69 62 2e 74 65 78 | 7d 0a 0a 25 25 25 25 25 |_lib.tex|}..%%%%%|
|00002fa0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002fb0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002fc0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002fd0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002fe0| 25 25 25 25 25 25 25 25 | 0a 5c 63 68 61 70 74 65 |%%%%%%%%|.\chapte|
|00002ff0| 72 7b 54 72 69 6d 6d 65 | 64 20 73 75 72 66 61 63 |r{Trimme|d surfac|
|00003000| 65 73 20 4c 69 62 72 61 | 72 79 2c 20 74 72 69 6d |es Libra|ry, trim|
|00003010| 5c 5f 6c 69 62 7d 0a 0a | 5c 73 65 63 74 69 6f 6e |\_lib}..|\section|
|00003020| 7b 47 65 6e 65 72 61 6c | 20 49 6e 66 6f 72 6d 61 |{General| Informa|
|00003030| 74 69 6f 6e 7d 0a 0a 54 | 68 69 73 20 6c 69 62 72 |tion}..T|his libr|
|00003040| 61 72 79 20 70 72 6f 76 | 69 64 65 73 20 61 20 73 |ary prov|ides a s|
|00003050| 65 74 20 6f 66 20 66 75 | 6e 63 74 69 6f 6e 20 74 |et of fu|nction t|
|00003060| 6f 20 6d 61 6e 69 70 75 | 6c 61 74 65 20 66 72 65 |o manipu|late fre|
|00003070| 65 66 6f 72 6d 20 74 72 | 69 6d 6d 65 64 0a 42 65 |eform tr|immed.Be|
|00003080| 7a 69 65 72 20 61 6e 64 | 2f 6f 72 20 4e 55 52 42 |zier and|/or NURB|
|00003090| 73 20 73 75 72 66 61 63 | 65 73 2e 20 54 68 69 73 |s surfac|es. This|
|000030a0| 20 6c 69 62 72 61 72 79 | 20 68 65 61 76 69 6c 79 | library| heavily|
|000030b0| 20 64 65 70 65 6e 64 73 | 20 6f 6e 20 74 68 65 20 | depends| on the |
|000030c0| 63 61 67 64 0a 6c 69 62 | 72 61 72 79 2e 20 46 75 |cagd.lib|rary. Fu|
|000030d0| 6e 63 74 69 6f 6e 73 20 | 61 72 65 20 70 72 6f 76 |nctions |are prov|
|000030e0| 69 64 65 64 20 74 6f 20 | 63 72 65 61 74 65 2c 20 |ided to |create, |
|000030f0| 63 6f 70 79 2c 20 61 6e | 64 20 64 65 73 74 72 75 |copy, an|d destru|
|00003100| 63 74 20 74 72 69 6d 6d | 65 64 0a 73 75 72 66 61 |ct trimm|ed.surfa|
|00003110| 63 65 73 20 74 6f 20 65 | 78 74 72 61 63 74 20 69 |ces to e|xtract i|
|00003120| 73 6f 70 61 72 61 6d 65 | 74 72 69 63 20 63 75 72 |soparame|tric cur|
|00003130| 76 65 73 2c 20 74 6f 20 | 65 76 61 6c 75 61 74 65 |ves, to |evaluate|
|00003140| 2c 20 72 65 66 69 6e 65 | 20 61 6e 64 0a 73 75 62 |, refine| and.sub|
|00003150| 64 69 76 69 64 65 2c 20 | 74 6f 20 72 65 61 64 20 |divide, |to read |
|00003160| 61 6e 64 20 77 72 69 74 | 65 20 74 72 69 6d 6d 65 |and writ|e trimme|
|00003170| 64 20 73 75 72 66 61 63 | 65 73 2c 20 64 65 67 72 |d surfac|es, degr|
|00003180| 65 65 20 72 61 69 73 65 | 2c 20 61 6e 64 0a 61 70 |ee raise|, and.ap|
|00003190| 70 72 6f 78 69 6d 61 74 | 65 20 75 73 69 6e 67 20 |proximat|e using |
|000031a0| 70 6f 6c 79 67 6f 6e 61 | 6c 20 72 65 70 72 65 73 |polygona|l repres|
|000031b0| 65 6e 74 61 74 69 6f 6e | 73 2e 0a 0a 54 68 65 20 |entation|s...The |
|000031c0| 69 6e 74 65 72 66 61 63 | 65 20 6f 66 20 74 68 65 |interfac|e of the|
|000031d0| 20 6c 69 62 72 61 72 79 | 20 69 73 20 64 65 66 69 | library| is defi|
|000031e0| 6e 65 64 20 69 6e 20 7b | 5c 65 6d 20 69 6e 63 6c |ned in {|\em incl|
|000031f0| 75 64 65 2f 74 72 69 6d | 5c 5f 6c 69 62 2e 68 7d |ude/trim|\_lib.h}|
|00003200| 2e 20 0a 0a 54 68 69 73 | 20 6c 69 62 72 61 72 79 |. ..This| library|
|00003210| 20 68 61 73 20 69 74 73 | 20 6f 77 6e 20 65 72 72 | has its| own err|
|00003220| 6f 72 20 68 61 6e 64 6c | 65 72 2c 20 77 68 69 63 |or handl|er, whic|
|00003230| 68 20 62 79 20 64 65 66 | 61 75 6c 74 20 70 72 69 |h by def|ault pri|
|00003240| 6e 74 73 20 61 6e 0a 65 | 72 72 6f 72 20 6d 65 73 |nts an.e|rror mes|
|00003250| 73 61 67 65 20 61 6e 64 | 20 65 78 69 74 20 74 68 |sage and| exit th|
|00003260| 65 20 70 72 6f 67 72 61 | 6d 20 63 61 6c 6c 65 64 |e progra|m called|
|00003270| 20 7b 5c 62 66 20 54 72 | 69 6d 46 61 74 61 6c 45 | {\bf Tr|imFatalE|
|00003280| 72 72 6f 72 7d 2e 0a 0a | 41 6c 6c 20 67 6c 6f 62 |rror}...|All glob|
|00003290| 61 6c 73 20 69 6e 20 74 | 68 69 73 20 6c 69 62 72 |als in t|his libr|
|000032a0| 61 72 79 20 68 61 76 65 | 20 61 20 70 72 65 66 69 |ary have| a prefi|
|000032b0| 78 20 6f 66 20 7b 5c 62 | 66 20 54 72 69 6d 7d 2e |x of {\b|f Trim}.|
|000032c0| 0a 0a 5c 73 65 63 74 69 | 6f 6e 7b 4c 69 62 72 61 |..\secti|on{Libra|
|000032d0| 72 79 20 46 75 6e 63 74 | 69 6f 6e 73 7d 0a 5c 69 |ry Funct|ions}.\i|
|000032e0| 6e 70 75 74 7b 70 72 6f | 67 5f 6d 61 6e 2f 74 72 |nput{pro|g_man/tr|
|000032f0| 69 6d 5f 6c 69 62 2e 74 | 65 78 7d 0a 0a 25 25 25 |im_lib.t|ex}..%%%|
|00003300| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003310| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003320| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003330| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003340| 25 25 25 25 25 25 25 25 | 25 25 0a 5c 63 68 61 70 |%%%%%%%%|%%.\chap|
|00003350| 74 65 72 7b 54 72 69 76 | 61 72 69 61 74 65 20 4c |ter{Triv|ariate L|
|00003360| 69 62 72 61 72 79 2c 20 | 74 72 69 76 5c 5f 6c 69 |ibrary, |triv\_li|
|00003370| 62 7d 0a 0a 5c 73 65 63 | 74 69 6f 6e 7b 47 65 6e |b}..\sec|tion{Gen|
|00003380| 65 72 61 6c 20 49 6e 66 | 6f 72 6d 61 74 69 6f 6e |eral Inf|ormation|
|00003390| 7d 0a 0a 54 68 69 73 20 | 6c 69 62 72 61 72 79 20 |}..This |library |
|000033a0| 70 72 6f 76 69 64 65 73 | 20 61 20 72 69 63 68 20 |provides| a rich |
|000033b0| 73 65 74 20 6f 66 20 66 | 75 6e 63 74 69 6f 6e 20 |set of f|unction |
|000033c0| 74 6f 20 6d 61 6e 69 70 | 75 6c 61 74 65 20 66 72 |to manip|ulate fr|
|000033d0| 65 65 66 6f 72 6d 0a 42 | 65 7a 69 65 72 20 61 6e |eeform.B|ezier an|
|000033e0| 64 2f 6f 72 20 4e 55 52 | 42 73 20 74 72 69 76 61 |d/or NUR|Bs triva|
|000033f0| 72 69 61 74 65 2e 20 54 | 68 69 73 20 6c 69 62 72 |riate. T|his libr|
|00003400| 61 72 79 20 68 65 61 76 | 69 6c 79 20 64 65 70 65 |ary heav|ily depe|
|00003410| 6e 64 73 20 6f 6e 20 74 | 68 65 20 63 61 67 64 0a |nds on t|he cagd.|
|00003420| 6c 69 62 72 61 72 79 2e | 20 46 75 6e 63 74 69 6f |library.| Functio|
|00003430| 6e 73 20 61 72 65 20 70 | 72 6f 76 69 64 65 64 20 |ns are p|rovided |
|00003440| 74 6f 20 63 72 65 61 74 | 65 2c 20 63 6f 70 79 2c |to creat|e, copy,|
|00003450| 20 61 6e 64 20 64 65 73 | 74 72 75 63 74 20 74 72 | and des|truct tr|
|00003460| 69 76 61 72 69 61 74 65 | 73 2c 0a 74 6f 20 65 78 |ivariate|s,.to ex|
|00003470| 74 72 61 63 74 20 69 73 | 6f 70 61 72 61 6d 65 74 |tract is|oparamet|
|00003480| 72 69 63 20 73 75 72 66 | 61 63 65 73 2c 20 74 6f |ric surf|aces, to|
|00003490| 20 65 76 61 6c 75 61 74 | 65 2c 20 72 65 66 69 6e | evaluat|e, refin|
|000034a0| 65 20 61 6e 64 20 73 75 | 62 64 69 76 69 64 65 2c |e and su|bdivide,|
|000034b0| 20 74 6f 0a 72 65 61 64 | 20 61 6e 64 20 77 72 69 | to.read| and wri|
|000034c0| 74 65 20 74 72 69 76 61 | 72 69 61 74 65 73 2c 20 |te triva|riates, |
|000034d0| 74 6f 20 64 69 66 66 65 | 72 65 6e 74 69 61 74 65 |to diffe|rentiate|
|000034e0| 2c 20 64 65 67 72 65 65 | 20 72 61 69 73 65 2c 20 |, degree| raise, |
|000034f0| 6d 61 6b 65 20 63 6f 6d | 70 61 74 69 62 6c 65 0a |make com|patible.|
|00003500| 61 6e 64 20 61 70 70 72 | 6f 78 69 6d 61 74 65 20 |and appr|oximate |
|00003510| 69 73 6f 2d 73 75 72 66 | 61 63 65 20 61 74 20 69 |iso-surf|ace at i|
|00003520| 73 6f 20 76 61 6c 75 65 | 73 20 75 73 69 6e 67 20 |so value|s using |
|00003530| 70 6f 6c 79 67 6f 6e 61 | 6c 20 72 65 70 72 65 73 |polygona|l repres|
|00003540| 65 6e 74 61 74 69 6f 6e | 73 2e 0a 0a 54 68 65 20 |entation|s...The |
|00003550| 69 6e 74 65 72 66 61 63 | 65 20 6f 66 20 74 68 65 |interfac|e of the|
|00003560| 20 6c 69 62 72 61 72 79 | 20 69 73 20 64 65 66 69 | library| is defi|
|00003570| 6e 65 64 20 69 6e 20 7b | 5c 65 6d 20 69 6e 63 6c |ned in {|\em incl|
|00003580| 75 64 65 2f 74 72 69 76 | 5c 5f 6c 69 62 2e 68 7d |ude/triv|\_lib.h}|
|00003590| 2e 20 0a 0a 54 68 69 73 | 20 6c 69 62 72 61 72 79 |. ..This| library|
|000035a0| 20 68 61 73 20 69 74 73 | 20 6f 77 6e 20 65 72 72 | has its| own err|
|000035b0| 6f 72 20 68 61 6e 64 6c | 65 72 2c 20 77 68 69 63 |or handl|er, whic|
|000035c0| 68 20 62 79 20 64 65 66 | 61 75 6c 74 20 70 72 69 |h by def|ault pri|
|000035d0| 6e 74 73 20 61 6e 0a 65 | 72 72 6f 72 20 6d 65 73 |nts an.e|rror mes|
|000035e0| 73 61 67 65 20 61 6e 64 | 20 65 78 69 74 20 74 68 |sage and| exit th|
|000035f0| 65 20 70 72 6f 67 72 61 | 6d 20 63 61 6c 6c 65 64 |e progra|m called|
|00003600| 20 7b 5c 62 66 20 54 72 | 69 76 46 61 74 61 6c 45 | {\bf Tr|ivFatalE|
|00003610| 72 72 6f 72 7d 2e 0a 0a | 41 6c 6c 20 67 6c 6f 62 |rror}...|All glob|
|00003620| 61 6c 73 20 69 6e 20 74 | 68 69 73 20 6c 69 62 72 |als in t|his libr|
|00003630| 61 72 79 20 68 61 76 65 | 20 61 20 70 72 65 66 69 |ary have| a prefi|
|00003640| 78 20 6f 66 20 7b 5c 62 | 66 20 54 72 69 76 7d 2e |x of {\b|f Triv}.|
|00003650| 0a 0a 5c 73 65 63 74 69 | 6f 6e 7b 4c 69 62 72 61 |..\secti|on{Libra|
|00003660| 72 79 20 46 75 6e 63 74 | 69 6f 6e 73 7d 0a 5c 69 |ry Funct|ions}.\i|
|00003670| 6e 70 75 74 7b 70 72 6f | 67 5f 6d 61 6e 2f 74 72 |nput{pro|g_man/tr|
|00003680| 69 76 5f 6c 69 62 2e 74 | 65 78 7d 0a 0a 25 25 25 |iv_lib.t|ex}..%%%|
|00003690| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000036a0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000036b0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000036c0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000036d0| 25 25 25 25 25 25 25 25 | 25 25 0a 5c 63 68 61 70 |%%%%%%%%|%%.\chap|
|000036e0| 74 65 72 7b 45 78 74 72 | 61 20 4c 69 62 72 61 72 |ter{Extr|a Librar|
|000036f0| 79 2c 20 78 74 72 61 5c | 5f 6c 69 62 7d 0a 0a 5c |y, xtra\|_lib}..\|
|00003700| 73 65 63 74 69 6f 6e 7b | 47 65 6e 65 72 61 6c 20 |section{|General |
|00003710| 49 6e 66 6f 72 6d 61 74 | 69 6f 6e 7d 0a 0a 54 68 |Informat|ion}..Th|
|00003720| 69 73 20 6c 69 62 72 61 | 72 79 20 69 73 20 6e 6f |is libra|ry is no|
|00003730| 74 20 61 6e 20 6f 66 66 | 69 63 69 61 6c 20 70 61 |t an off|icial pa|
|00003740| 72 74 20 6f 66 20 49 52 | 49 54 20 61 6e 64 20 63 |rt of IR|IT and c|
|00003750| 6f 6e 74 61 69 6e 73 20 | 70 75 62 6c 69 63 0a 64 |ontains |public.d|
|00003760| 6f 6d 61 69 6e 20 63 6f | 64 65 20 74 68 61 74 20 |omain co|de that |
|00003770| 69 73 20 75 73 65 64 20 | 62 79 20 72 6f 75 74 69 |is used |by routi|
|00003780| 6e 65 73 20 69 6e 20 49 | 52 49 54 2e 0a 0a 54 68 |nes in I|RIT...Th|
|00003790| 65 20 69 6e 74 65 72 66 | 61 63 65 20 6f 66 20 74 |e interf|ace of t|
|000037a0| 68 65 20 6c 69 62 72 61 | 72 79 20 69 73 20 64 65 |he libra|ry is de|
|000037b0| 66 69 6e 65 64 20 69 6e | 20 7b 5c 65 6d 20 69 6e |fined in| {\em in|
|000037c0| 63 6c 75 64 65 2f 65 78 | 74 72 61 5c 5f 66 6e 2e |clude/ex|tra\_fn.|
|000037d0| 68 7d 2e 20 0a 0a 5c 73 | 65 63 74 69 6f 6e 7b 4c |h}. ..\s|ection{L|
|000037e0| 69 62 72 61 72 79 20 46 | 75 6e 63 74 69 6f 6e 73 |ibrary F|unctions|
|000037f0| 7d 0a 5c 69 6e 70 75 74 | 7b 70 72 6f 67 5f 6d 61 |}.\input|{prog_ma|
|00003800| 6e 2f 78 74 72 61 5f 6c | 69 62 2e 74 65 78 7d 0a |n/xtra_l|ib.tex}.|
|00003810| 0a 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |.%%%%%%%|%%%%%%%%|
|00003820| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003830| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003840| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003850| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 0a 5c |%%%%%%%%|%%%%%%.\|
|00003860| 63 68 61 70 74 65 72 7b | 50 72 6f 67 72 61 6d 6d |chapter{|Programm|
|00003870| 69 6e 67 20 45 78 61 6d | 70 6c 65 73 7d 0a 5c 6c |ing Exam|ples}.\l|
|00003880| 61 62 65 6c 7b 63 68 61 | 70 2d 65 78 61 6d 70 6c |abel{cha|p-exampl|
|00003890| 65 73 7d 0a 0a 54 68 69 | 73 20 63 68 61 70 74 65 |es}..Thi|s chapte|
|000038a0| 72 20 64 65 73 63 72 69 | 62 65 73 20 73 65 76 65 |r descri|bes seve|
|000038b0| 72 61 6c 20 73 69 6d 70 | 6c 65 20 65 78 61 6d 70 |ral simp|le examp|
|000038c0| 6c 65 73 20 6f 66 20 43 | 20 70 72 6f 67 72 61 6d |les of C| program|
|000038d0| 73 20 74 68 61 74 0a 65 | 78 70 6c 6f 69 74 73 20 |s that.e|xploits |
|000038e0| 74 68 65 20 6c 69 62 72 | 61 72 69 65 73 20 6f 66 |the libr|aries of|
|000038f0| 20 49 52 49 54 2e 20 41 | 6c 6c 20 65 78 74 65 72 | IRIT. A|ll exter|
|00003900| 6e 61 6c 20 66 75 6e 63 | 74 69 6f 6e 20 61 72 65 |nal func|tion are|
|00003910| 20 64 65 66 69 6e 65 64 | 20 69 6e 0a 74 68 65 20 | defined| in.the |
|00003920| 7b 5c 65 6d 20 69 6e 63 | 6c 75 64 65 7d 20 73 75 |{\em inc|lude} su|
|00003930| 62 64 69 72 65 63 74 6f | 72 79 20 6f 66 20 49 52 |bdirecto|ry of IR|
|00003940| 49 54 20 61 6e 64 20 6f | 6e 65 20 63 61 6e 20 27 |IT and o|ne can '|
|00003950| 67 72 65 70 27 20 74 68 | 65 72 65 20 66 6f 72 20 |grep' th|ere for |
|00003960| 74 68 65 0a 65 78 61 63 | 74 20 69 6e 63 6c 75 64 |the.exac|t includ|
|00003970| 65 20 66 69 6c 65 20 74 | 68 61 74 20 63 6f 6e 74 |e file t|hat cont|
|00003980| 61 69 6e 73 20 61 20 63 | 65 72 74 61 69 6e 20 66 |ains a c|ertain f|
|00003990| 75 6e 63 74 69 6f 6e 20 | 6e 61 6d 65 2e 20 41 6c |unction |name. Al|
|000039a0| 6c 20 43 20 70 72 6f 67 | 72 61 6d 73 0a 69 6e 20 |l C prog|rams.in |
|000039b0| 61 6c 6c 20 43 20 66 69 | 6c 65 73 20 73 68 6f 75 |all C fi|les shou|
|000039c0| 6c 64 20 69 6e 63 6c 75 | 64 65 20 27 69 72 69 74 |ld inclu|de 'irit|
|000039d0| 5c 5f 73 6d 2e 68 27 20 | 61 73 20 74 68 65 69 72 |\_sm.h' |as their|
|000039e0| 20 66 69 72 73 74 20 69 | 6e 63 6c 75 64 65 20 66 | first i|nclude f|
|000039f0| 69 6c 65 0a 6f 66 20 49 | 52 49 54 2c 20 62 65 66 |ile.of I|RIT, bef|
|00003a00| 6f 72 65 20 61 6e 79 20 | 6f 74 68 65 72 20 69 6e |ore any |other in|
|00003a10| 63 6c 75 64 65 20 66 69 | 6c 65 20 6f 66 20 49 52 |clude fi|le of IR|
|00003a20| 49 54 2e 20 48 65 61 64 | 65 72 20 66 69 6c 65 73 |IT. Head|er files|
|00003a30| 20 61 72 65 20 73 65 74 | 20 73 6f 0a 43 2b 2b 20 | are set| so.C++ |
|00003a40| 63 6f 64 65 20 63 61 6e | 20 63 6f 6d 70 69 6c 65 |code can| compile|
|00003a50| 20 61 6e 64 20 6c 69 6e | 6b 20 74 6f 20 69 74 20 | and lin|k to it |
|00003a60| 77 69 74 68 6f 75 74 20 | 61 6e 79 20 73 70 65 63 |without |any spec|
|00003a70| 69 61 6c 20 74 72 65 61 | 74 6d 65 6e 74 2e 0a 0a |ial trea|tment...|
|00003a80| 5c 73 65 63 74 69 6f 6e | 7b 53 65 74 74 69 6e 67 |\section|{Setting|
|00003a90| 20 75 70 20 74 68 65 20 | 43 6f 6d 70 69 6c 61 74 | up the |Compilat|
|00003aa0| 69 6f 6e 20 45 6e 76 69 | 72 6f 6e 6d 65 6e 74 7d |ion Envi|ronment}|
|00003ab0| 0a 0a 49 6e 20 6f 72 64 | 65 72 20 74 6f 20 63 6f |..In ord|er to co|
|00003ac0| 6d 70 69 6c 65 20 70 72 | 6f 67 72 61 6d 73 20 74 |mpile pr|ograms t|
|00003ad0| 68 61 74 20 75 73 65 73 | 20 74 68 65 20 6c 69 62 |hat uses| the lib|
|00003ae0| 72 61 72 69 65 73 20 6f | 66 20 49 52 49 54 2c 20 |raries o|f IRIT, |
|00003af0| 61 20 6d 61 6b 65 66 69 | 6c 65 0a 68 61 73 20 74 |a makefi|le.has t|
|00003b00| 6f 20 62 65 20 63 6f 6e | 73 74 72 75 63 74 65 64 |o be con|structed|
|00003b10| 2e 20 41 73 73 75 6d 69 | 6e 67 20 49 52 49 54 20 |. Assumi|ng IRIT |
|00003b20| 69 73 20 69 6e 73 74 61 | 6c 6c 65 64 20 69 6e 20 |is insta|lled in |
|00003b30| 7b 5c 65 6d 20 2f 75 73 | 72 2f 6c 6f 63 61 6c 2f |{\em /us|r/local/|
|00003b40| 69 72 69 74 7d 2c 0a 68 | 65 72 65 20 69 73 20 61 |irit},.h|ere is a|
|00003b50| 20 73 69 6d 70 6c 65 20 | 6d 61 6b 65 66 69 6c 65 | simple |makefile|
|00003b60| 20 74 68 61 74 20 63 61 | 6e 20 62 65 20 75 73 65 | that ca|n be use|
|00003b70| 64 20 28 66 6f 72 20 61 | 20 75 6e 69 78 20 65 6e |d (for a| unix en|
|00003b80| 76 69 72 6f 6e 6d 65 6e | 74 29 3a 0a 0a 5c 62 65 |vironmen|t):..\be|
|00003b90| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0a 49 52 |gin{verb|atim}.IR|
|00003ba0| 49 54 5f 44 49 52 20 3d | 20 2f 75 73 72 2f 6c 6f |IT_DIR =| /usr/lo|
|00003bb0| 63 61 6c 2f 69 72 69 74 | 0a 0a 69 6e 63 6c 75 64 |cal/irit|..includ|
|00003bc0| 65 20 24 28 49 52 49 54 | 5f 44 49 52 29 2f 6d 61 |e $(IRIT|_DIR)/ma|
|00003bd0| 6b 65 66 6c 61 67 2e 75 | 6e 78 0a 0a 4f 42 4a 53 |keflag.u|nx..OBJS|
|00003be0| 09 3d 20 70 72 6f 67 72 | 61 6d 2e 6f 0a 0a 70 72 |.= progr|am.o..pr|
|00003bf0| 6f 67 72 61 6d 3a 20 24 | 28 4f 42 4a 53 29 0a 09 |ogram: $|(OBJS)..|
|00003c00| 24 28 43 43 29 20 24 28 | 43 46 4c 41 47 53 29 20 |$(CC) $(|CFLAGS) |
|00003c10| 2d 6f 20 70 72 6f 67 72 | 61 6d 20 24 28 4f 42 4a |-o progr|am $(OBJ|
|00003c20| 53 29 20 24 28 4c 49 42 | 53 29 20 2d 6c 6d 20 24 |S) $(LIB|S) -lm $|
|00003c30| 28 4d 4f 52 45 4c 49 42 | 53 29 0a 5c 65 6e 64 7b |(MORELIB|S).\end{|
|00003c40| 76 65 72 62 61 74 69 6d | 7d 0a 0a 54 68 65 20 73 |verbatim|}..The s|
|00003c50| 69 6d 70 6c 69 63 69 74 | 79 20 6f 66 20 74 68 69 |implicit|y of thi|
|00003c60| 73 20 6d 61 6b 65 66 69 | 6c 65 20 69 73 20 64 72 |s makefi|le is dr|
|00003c70| 61 77 6e 20 66 72 6f 6d | 20 74 68 65 20 63 6f 6d |awn from| the com|
|00003c80| 70 6c 65 78 69 74 79 20 | 6f 66 0a 6d 61 6b 65 66 |plexity |of.makef|
|00003c90| 6c 61 67 2e 75 6e 78 2e | 20 54 68 65 20 66 69 6c |lag.unx.| The fil|
|00003ca0| 65 20 6d 61 6b 65 66 6c | 61 67 2e 75 6e 78 20 73 |e makefl|ag.unx s|
|00003cb0| 65 74 73 20 74 68 65 20 | 43 43 2c 20 43 46 4c 41 |ets the |CC, CFLA|
|00003cc0| 47 53 2c 20 4c 49 42 53 | 2c 20 61 6e 64 0a 4d 4f |GS, LIBS|, and.MO|
|00003cd0| 52 45 4c 49 42 53 20 66 | 6f 72 20 74 68 65 20 6d |RELIBS f|or the m|
|00003ce0| 61 63 68 69 6e 65 64 20 | 75 73 69 6e 67 20 61 6d |achined |using am|
|00003cf0| 6f 6e 67 20 6f 74 68 65 | 72 20 74 68 69 6e 67 73 |ong othe|r things|
|00003d00| 2e 20 46 75 72 74 68 65 | 72 6d 6f 72 65 2c 0a 6d |. Furthe|rmore,.m|
|00003d10| 61 6b 65 66 6c 61 67 2e | 75 6e 78 20 61 6c 73 6f |akeflag.|unx also|
|00003d20| 20 73 65 74 73 20 74 68 | 65 20 64 65 66 61 75 6c | sets th|e defaul|
|00003d30| 74 20 63 6f 6d 70 69 6c | 61 74 69 6f 6e 20 72 75 |t compil|ation ru|
|00003d40| 6c 65 73 20 66 72 6f 6d | 20 43 20 73 6f 75 72 63 |les from| C sourc|
|00003d50| 65 73 20 74 6f 0a 6f 62 | 6a 65 63 74 20 66 69 6c |es to.ob|ject fil|
|00003d60| 65 73 2e 20 20 54 68 65 | 20 66 69 6c 65 20 6d 61 |es. The| file ma|
|00003d70| 6b 65 66 6c 61 67 2e 75 | 6e 78 20 68 61 64 20 74 |keflag.u|nx had t|
|00003d80| 6f 20 62 65 20 6d 6f 64 | 69 66 69 65 64 20 6f 6e |o be mod|ified on|
|00003d90| 63 65 2c 20 77 68 65 6e | 0a 49 52 49 54 20 77 61 |ce, when|.IRIT wa|
|00003da0| 73 20 69 6e 73 74 61 6c | 6c 65 64 20 6f 6e 20 74 |s instal|led on t|
|00003db0| 68 69 73 20 73 79 73 74 | 65 6d 2e 20 49 66 20 74 |his syst|em. If t|
|00003dc0| 68 65 20 75 73 65 64 20 | 73 79 73 74 65 6d 20 69 |he used |system i|
|00003dd0| 73 20 6e 6f 74 20 61 20 | 75 6e 69 78 0a 65 6e 76 |s not a |unix.env|
|00003de0| 69 72 6f 6e 6d 65 6e 74 | 2c 20 74 68 65 6e 20 74 |ironment|, then t|
|00003df0| 68 65 20 66 69 6c 65 20 | 6d 61 6b 65 66 69 6c 65 |he file |makefile|
|00003e00| 2e 75 6e 78 20 77 69 6c | 6c 20 68 61 76 65 20 74 |.unx wil|l have t|
|00003e10| 6f 20 62 65 20 72 65 70 | 6c 61 63 65 64 20 77 69 |o be rep|laced wi|
|00003e20| 74 68 0a 74 68 65 20 70 | 72 6f 70 65 72 20 6d 61 |th.the p|roper ma|
|00003e30| 6b 65 66 6c 61 67 20 66 | 69 6c 65 2e 20 20 49 6e |keflag f|ile. In|
|00003e40| 20 61 6e 20 4f 53 32 20 | 65 6e 76 69 72 6f 6e 6d | an OS2 |environm|
|00003e50| 65 6e 74 2c 20 75 73 69 | 6e 67 20 74 68 65 20 65 |ent, usi|ng the e|
|00003e60| 6d 78 20 67 63 63 0a 63 | 6f 6d 70 69 6c 65 72 2c |mx gcc.c|ompiler,|
|00003e70| 20 74 68 65 20 6d 61 6b | 65 66 69 6c 65 20 69 73 | the mak|efile is|
|00003e80| 20 65 76 65 6e 20 73 69 | 6d 70 6c 65 72 20 73 69 | even si|mpler si|
|00003e90| 6e 63 65 20 74 68 65 20 | 6c 69 6e 6b 69 6e 67 20 |nce the |linking |
|00003ea0| 72 75 6c 65 20 69 73 20 | 61 6c 73 6f 0a 64 65 66 |rule is |also.def|
|00003eb0| 69 6e 65 64 20 69 6e 20 | 6d 61 6b 65 66 6c 61 67 |ined in |makeflag|
|00003ec0| 2e 6f 73 32 3a 0a 0a 5c | 62 65 67 69 6e 7b 76 65 |.os2:..\|begin{ve|
|00003ed0| 72 62 61 74 69 6d 7d 0a | 49 52 49 54 5f 44 49 52 |rbatim}.|IRIT_DIR|
|00003ee0| 20 3d 20 5c 75 73 72 5c | 6c 6f 63 61 6c 5c 69 72 | = \usr\|local\ir|
|00003ef0| 69 74 0a 0a 69 6e 63 6c | 75 64 65 20 24 28 49 52 |it..incl|ude $(IR|
|00003f00| 49 54 5f 44 49 52 29 5c | 6d 61 6b 65 66 6c 61 67 |IT_DIR)\|makeflag|
|00003f10| 2e 6f 73 32 0a 0a 4f 42 | 4a 53 09 3d 20 70 72 6f |.os2..OB|JS.= pro|
|00003f20| 67 72 61 6d 2e 6f 0a 0a | 70 72 6f 67 72 61 6d 2e |gram.o..|program.|
|00003f30| 65 78 65 3a 20 24 28 4f | 42 4a 53 29 0a 5c 65 6e |exe: $(O|BJS).\en|
|00003f40| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0a 0a 46 69 6e |d{verbat|im}..Fin|
|00003f50| 61 6c 6c 79 2c 20 68 65 | 72 65 20 69 73 20 61 20 |ally, he|re is a |
|00003f60| 70 72 6f 70 65 72 20 6d | 61 6b 65 66 69 6c 65 20 |proper m|akefile |
|00003f70| 66 6f 72 20 57 69 6e 64 | 6f 77 73 20 4e 54 3a 0a |for Wind|ows NT:.|
|00003f80| 0a 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|00003f90| 7d 0a 49 52 49 54 5f 44 | 49 52 20 3d 20 5c 75 73 |}.IRIT_D|IR = \us|
|00003fa0| 72 5c 6c 6f 63 61 6c 5c | 69 72 69 74 0a 0a 69 6e |r\local\|irit..in|
|00003fb0| 63 6c 75 64 65 20 24 28 | 49 52 49 54 5f 44 49 52 |clude $(|IRIT_DIR|
|00003fc0| 29 5c 6d 61 6b 65 66 6c | 61 67 2e 77 6e 74 0a 0a |)\makefl|ag.wnt..|
|00003fd0| 4f 42 4a 53 09 3d 20 70 | 72 6f 67 72 61 6d 2e 6f |OBJS.= p|rogram.o|
|00003fe0| 62 6a 0a 0a 70 72 6f 67 | 72 61 6d 2e 65 78 65 3a |bj..prog|ram.exe:|
|00003ff0| 20 24 28 4f 42 4a 53 29 | 0a 20 20 20 20 20 20 20 | $(OBJS)|. |
|00004000| 20 24 28 49 52 49 54 43 | 4f 4e 4c 49 4e 4b 29 20 | $(IRITC|ONLINK) |
|00004010| 2d 6f 75 74 3a 70 72 6f | 67 72 61 6d 2e 65 78 65 |-out:pro|gram.exe|
|00004020| 20 24 28 4f 42 4a 53 29 | 20 24 28 4c 49 42 53 29 | $(OBJS)| $(LIBS)|
|00004030| 20 24 28 57 33 32 43 4f | 4e 4c 49 42 53 29 0a 5c | $(W32CO|NLIBS).\|
|00004040| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0a 0a 5c |end{verb|atim}..\|
|00004050| 73 65 63 74 69 6f 6e 7b | 53 69 6d 70 6c 65 20 43 |section{|Simple C|
|00004060| 20 50 72 6f 67 72 61 6d | 73 20 75 73 69 6e 67 20 | Program|s using |
|00004070| 49 52 49 54 7d 0a 0a 4e | 6f 77 20 74 68 61 74 20 |IRIT}..N|ow that |
|00004080| 77 65 20 68 61 76 65 20 | 61 6e 20 69 64 65 61 20 |we have |an idea |
|00004090| 68 6f 77 20 74 6f 20 63 | 6f 6d 70 69 6c 65 20 43 |how to c|ompile C|
|000040a0| 20 63 6f 64 65 20 75 73 | 69 6e 67 20 49 52 49 54 | code us|ing IRIT|
|000040b0| 2c 20 68 65 72 65 20 61 | 72 65 20 73 65 76 65 72 |, here a|re sever|
|000040c0| 61 6c 0a 65 78 61 6d 70 | 6c 65 73 20 74 6f 20 72 |al.examp|les to r|
|000040d0| 65 61 64 2c 20 6d 61 6e | 69 70 75 6c 61 74 65 20 |ead, man|ipulate |
|000040e0| 61 6e 64 20 77 72 69 74 | 65 20 49 52 49 54 20 64 |and writ|e IRIT d|
|000040f0| 61 74 61 20 66 69 6c 65 | 73 2e 20 59 6f 75 20 77 |ata file|s. You w|
|00004100| 69 6c 6c 20 62 65 20 61 | 62 6c 65 20 74 6f 0a 66 |ill be a|ble to.f|
|00004110| 69 6e 64 20 61 6c 6c 20 | 74 68 65 73 65 20 65 78 |ind all |these ex|
|00004120| 61 6d 70 6c 65 73 20 69 | 6e 20 74 68 65 20 64 6f |amples i|n the do|
|00004130| 63 2f 63 65 78 61 6d 70 | 6c 65 20 64 69 72 65 63 |c/cexamp|le direc|
|00004140| 74 6f 72 79 2e 0a 0a 5c | 73 75 62 73 65 63 74 69 |tory...\|subsecti|
|00004150| 6f 6e 7b 43 6f 6d 70 75 | 74 65 20 41 72 65 61 20 |on{Compu|te Area |
|00004160| 6f 66 20 61 20 50 6f 6c | 79 67 6f 6e 61 6c 20 4d |of a Pol|ygonal M|
|00004170| 6f 64 65 6c 20 28 70 6f | 6c 79 61 72 65 61 2e 63 |odel (po|lyarea.c|
|00004180| 29 7d 0a 0a 48 65 72 65 | 20 69 73 20 61 20 73 69 |)}..Here| is a si|
|00004190| 6d 70 6c 65 20 70 72 6f | 67 72 61 6d 20 74 6f 20 |mple pro|gram to |
|000041a0| 63 6f 6d 70 75 74 65 20 | 74 68 65 20 74 6f 74 61 |compute |the tota|
|000041b0| 6c 20 61 72 65 61 20 6f | 66 20 61 6c 6c 20 70 6f |l area o|f all po|
|000041c0| 6c 79 67 6f 6e 73 20 69 | 6e 0a 74 68 65 20 67 69 |lygons i|n.the gi|
|000041d0| 76 65 6e 20 64 61 74 61 | 20 66 69 6c 65 2e 20 54 |ven data| file. T|
|000041e0| 68 65 20 70 72 6f 67 72 | 61 6d 20 65 78 70 65 63 |he progr|am expec|
|000041f0| 74 73 20 6f 6e 65 20 61 | 72 67 75 6d 65 6e 74 20 |ts one a|rgument |
|00004200| 6f 6e 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 0a 6c |on the c|ommand.l|
|00004210| 69 6e 65 20 77 68 69 63 | 68 20 69 73 20 74 68 65 |ine whic|h is the|
|00004220| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 66 69 6c | name of| the fil|
|00004230| 65 20 74 6f 20 72 65 61 | 64 2c 20 61 6e 64 20 69 |e to rea|d, and i|
|00004240| 74 20 70 72 69 6e 74 73 | 20 6f 75 74 20 6f 6e 65 |t prints| out one|
|00004250| 0a 6c 69 6e 65 20 77 69 | 74 68 20 74 68 65 20 74 |.line wi|th the t|
|00004260| 6f 74 61 6c 20 63 6f 6d | 70 75 74 65 64 20 61 72 |otal com|puted ar|
|00004270| 65 61 2e 0a 0a 5c 69 6e | 70 75 74 7b 63 65 78 61 |ea...\in|put{cexa|
|00004280| 6d 70 6c 65 2f 70 6f 6c | 79 61 72 65 61 2e 74 65 |mple/pol|yarea.te|
|00004290| 78 7d 0a 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |x}..\sub|section{|
|000042a0| 43 6f 6e 76 65 72 74 73 | 20 61 20 46 72 65 65 66 |Converts| a Freef|
|000042b0| 6f 72 6d 20 53 75 72 66 | 61 63 65 20 69 6e 74 6f |orm Surf|ace into|
|000042c0| 20 50 6f 6c 79 67 6f 6e | 73 20 28 70 6f 6c 79 67 | Polygon|s (polyg|
|000042d0| 6f 6e 73 2e 63 29 7d 0a | 0a 54 68 69 73 20 74 72 |ons.c)}.|.This tr|
|000042e0| 75 65 20 66 69 6c 74 65 | 72 20 72 65 61 64 73 20 |ue filte|r reads |
|000042f0| 61 20 73 69 6e 67 6c 65 | 20 73 75 72 66 61 63 65 |a single| surface|
|00004300| 20 66 72 6f 6d 20 73 74 | 64 69 6e 20 61 6e 64 20 | from st|din and |
|00004310| 64 75 6d 70 73 20 6f 75 | 74 20 61 0a 70 6f 6c 79 |dumps ou|t a.poly|
|00004320| 67 6f 6e 61 6c 20 61 70 | 70 72 6f 78 69 6d 61 74 |gonal ap|proximat|
|00004330| 69 6f 6e 20 6f 66 20 69 | 74 20 74 6f 20 73 74 64 |ion of i|t to std|
|00004340| 6f 75 74 2e 20 54 68 65 | 79 20 61 72 65 20 73 65 |out. The|y are se|
|00004350| 76 65 72 61 6c 20 70 61 | 72 61 6d 65 74 65 72 73 |veral pa|rameters|
|00004360| 0a 74 68 61 74 20 63 6f | 6e 74 72 6f 6c 73 20 74 |.that co|ntrols t|
|00004370| 68 65 20 77 61 79 20 61 | 20 73 75 72 66 61 63 65 |he way a| surface|
|00004380| 20 69 73 20 61 70 70 72 | 6f 78 69 6d 61 74 65 64 | is appr|oximated|
|00004390| 20 69 6e 74 6f 20 70 6f | 6c 79 67 6f 6e 73 20 61 | into po|lygons a|
|000043a0| 6e 64 20 69 6e 0a 74 68 | 69 73 20 73 69 6d 70 6c |nd in.th|is simpl|
|000043b0| 65 20 66 69 6c 74 65 72 | 20 74 68 65 79 20 61 72 |e filter| they ar|
|000043c0| 65 20 62 65 69 6e 67 20 | 68 65 6c 64 20 66 69 78 |e being |held fix|
|000043d0| 65 64 20 69 6e 20 61 20 | 73 65 74 20 6f 66 20 69 |ed in a |set of i|
|000043e0| 6e 74 65 67 65 72 0a 76 | 61 72 69 61 62 6c 65 73 |nteger.v|ariables|
|000043f0| 2e 0a 0a 5c 69 6e 70 75 | 74 7b 63 65 78 61 6d 70 |...\inpu|t{cexamp|
|00004400| 6c 65 2f 70 6f 6c 79 67 | 6f 6e 73 2e 74 65 78 7d |le/polyg|ons.tex}|
|00004410| 0a 0a 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 4c 69 |..\subse|ction{Li|
|00004420| 6e 65 61 72 20 54 72 61 | 6e 73 66 6f 72 6d 61 74 |near Tra|nsformat|
|00004430| 69 6f 6e 73 27 20 46 69 | 6c 74 65 72 20 28 74 72 |ions' Fi|lter (tr|
|00004440| 61 6e 73 66 72 6d 2e 63 | 29 7d 0a 0a 54 68 69 73 |ansfrm.c|)}..This|
|00004450| 20 6c 69 74 74 6c 65 20 | 6d 6f 72 65 20 63 6f 6d | little |more com|
|00004460| 70 6c 65 78 20 70 72 6f | 67 72 61 6d 20 74 72 61 |plex pro|gram tra|
|00004470| 6e 73 66 72 6f 6d 73 20 | 61 6c 6c 20 74 68 65 20 |nsfroms |all the |
|00004480| 67 65 6f 6d 65 74 72 79 | 20 69 6e 20 74 68 65 0a |geometry| in the.|
|00004490| 72 65 61 64 20 64 61 74 | 61 20 77 68 69 63 68 20 |read dat|a which |
|000044a0| 63 61 6e 20 62 65 20 61 | 6e 79 20 6e 75 6d 62 65 |can be a|ny numbe|
|000044b0| 72 20 6f 66 20 66 69 6c | 65 73 20 61 63 63 6f 72 |r of fil|es accor|
|000044c0| 64 69 6e 67 20 74 6f 20 | 74 68 65 20 73 70 65 63 |ding to |the spec|
|000044d0| 69 66 69 65 64 0a 74 72 | 61 6e 73 66 6f 72 6d 61 |ified.tr|ansforma|
|000044e0| 74 69 6f 6e 73 20 6f 6e | 20 74 68 65 20 63 6f 6d |tions on| the com|
|000044f0| 6d 61 6e 64 20 6c 69 6e | 65 2e 20 54 68 65 20 63 |mand lin|e. The c|
|00004500| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 20 69 73 20 70 |ommand l|ine is p|
|00004510| 61 72 73 65 64 20 76 69 | 61 0a 7b 5c 62 66 20 47 |arsed vi|a.{\bf G|
|00004520| 41 47 65 74 41 72 67 73 | 7d 20 61 6e 64 20 69 74 |AGetArgs|} and it|
|00004530| 73 20 61 73 73 6f 63 69 | 61 74 65 64 20 66 75 6e |s associ|ated fun|
|00004540| 63 74 69 6f 6e 73 2e 20 | 54 68 65 20 74 72 61 6e |ctions. |The tran|
|00004550| 73 66 6f 72 6d 61 74 69 | 6f 6e 0a 6d 61 74 72 69 |sformati|on.matri|
|00004560| 78 20 69 73 20 74 68 65 | 6e 20 63 6f 6d 70 75 74 |x is the|n comput|
|00004570| 65 64 20 77 69 74 68 20 | 74 68 65 20 61 69 64 20 |ed with |the aid |
|00004580| 6f 66 20 74 68 65 20 6d | 61 74 72 69 78 20 70 61 |of the m|atrix pa|
|00004590| 63 6b 61 67 65 20 61 6e | 64 20 61 70 70 6c 69 65 |ckage an|d applie|
|000045a0| 64 0a 74 6f 20 74 68 65 | 20 72 65 61 64 20 67 65 |d.to the| read ge|
|000045b0| 6f 6d 65 74 72 79 20 61 | 74 20 6f 6e 63 65 2e 0a |ometry a|t once..|
|000045c0| 0a 5c 69 6e 70 75 74 7b | 63 65 78 61 6d 70 6c 65 |.\input{|cexample|
|000045d0| 2f 74 72 61 6e 73 66 72 | 6d 2e 74 65 78 7d 0a 0a |/transfr|m.tex}..|
|000045e0| 48 65 72 65 20 69 73 20 | 74 68 65 20 72 65 73 75 |Here is |the resu|
|000045f0| 6c 74 20 6f 66 20 72 75 | 6e 6e 69 6e 67 20 27 74 |lt of ru|nning 't|
|00004600| 72 61 6e 73 66 72 6d 20 | 2d 68 27 3a 0a 5c 62 65 |ransfrm |-h':.\be|
|00004610| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0a 54 68 |gin{verb|atim}.Th|
|00004620| 69 73 20 69 73 20 54 72 | 61 6e 73 66 6f 72 6d 2e |is is Tr|ansform.|
|00004630| 2e 2e 0a 55 73 61 67 65 | 3a 20 54 72 61 6e 73 66 |...Usage|: Transf|
|00004640| 72 6d 20 5b 2d 78 20 44 | 65 67 73 5d 20 5b 2d 79 |rm [-x D|egs] [-y|
|00004650| 20 44 65 67 73 5d 20 5b | 2d 7a 20 44 65 67 73 5d | Degs] [|-z Degs]|
|00004660| 20 5b 2d 74 20 58 20 59 | 20 5a 5d 20 5b 2d 73 20 | [-t X Y| Z] [-s |
|00004670| 53 63 61 6c 65 5d 20 5b | 2d 68 5d 20 44 46 69 6c |Scale] [|-h] DFil|
|00004680| 65 73 0a 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d |es.\end{|verbatim|
|00004690| 7d 0a 0a 57 68 65 6e 20 | 79 6f 75 20 61 72 65 20 |}..When |you are |
|000046a0| 63 6f 6e 73 69 64 65 72 | 69 6e 67 20 74 68 65 20 |consider|ing the |
|000046b0| 75 73 65 66 75 6c 6e 65 | 73 73 20 6f 66 20 74 68 |usefulne|ss of th|
|000046c0| 69 73 20 74 6f 6f 6c 20 | 72 65 6d 65 6d 62 65 72 |is tool |remember|
|000046d0| 20 74 68 61 74 20 74 68 | 65 0a 74 72 61 6e 73 66 | that th|e.transf|
|000046e0| 6f 72 6d 61 74 69 6f 6e | 73 20 61 72 65 20 61 70 |ormation|s are ap|
|000046f0| 70 6c 69 65 64 20 74 6f | 20 74 68 65 20 67 65 6f |plied to| the geo|
|00004700| 6d 65 74 72 79 20 69 6e | 20 61 6e 20 69 6e 74 65 |metry in| an inte|
|00004710| 72 6e 61 6c 20 6f 72 64 | 65 72 20 77 68 69 63 68 |rnal ord|er which|
|00004720| 20 69 73 0a 64 69 66 66 | 65 72 65 6e 74 20 66 72 | is.diff|erent fr|
|00004730| 6f 6d 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 6c |om the c|ommand l|
|00004740| 69 6e 65 20 6f 72 64 65 | 72 2e 20 54 68 61 74 20 |ine orde|r. That |
|00004750| 69 73 2c 0a 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |is,.\beg|in{verba|
|00004760| 74 69 6d 7d 0a 20 20 20 | 20 20 74 72 61 6e 73 66 |tim}. | transf|
|00004770| 72 6d 20 2d 78 20 33 30 | 20 2d 79 20 33 30 20 67 |rm -x 30| -y 30 g|
|00004780| 65 6f 6d 65 74 72 79 2e | 64 61 74 20 3e 20 74 67 |eometry.|dat > tg|
|00004790| 65 6f 6d 65 74 72 79 2e | 64 61 74 0a 5c 65 6e 64 |eometry.|dat.\end|
|000047a0| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 77 69 6c 6c 20 |{verbati|m}.will |
|000047b0| 63 6f 6d 70 75 74 65 20 | 74 68 65 20 65 78 61 63 |compute |the exac|
|000047c0| 74 20 73 61 6d 65 20 74 | 72 61 6e 73 66 72 6f 6d |t same t|ransfrom|
|000047d0| 20 61 73 2c 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 | as,.\be|gin{verb|
|000047e0| 61 74 69 6d 7d 0a 20 20 | 20 20 20 74 72 61 6e 73 |atim}. | trans|
|000047f0| 66 72 6d 20 2d 79 20 33 | 30 20 2d 78 20 33 30 20 |frm -y 3|0 -x 30 |
|00004800| 67 65 6f 6d 65 74 72 79 | 2e 64 61 74 20 3e 20 74 |geometry|.dat > t|
|00004810| 67 65 6f 6d 65 74 72 79 | 2e 64 61 74 0a 5c 65 6e |geometry|.dat.\en|
|00004820| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0a 54 68 69 73 |d{verbat|im}.This|
|00004830| 2c 20 77 68 69 6c 65 20 | 72 6f 74 61 74 69 6f 6e |, while |rotation|
|00004840| 20 69 73 20 6e 6f 74 20 | 61 20 63 6f 6d 6d 75 74 | is not |a commut|
|00004850| 61 74 69 76 65 20 6f 70 | 65 72 61 74 69 6f 6e 2e |ative op|eration.|
|00004860| 0a 4e 6f 6e 65 74 68 65 | 6c 65 73 73 2c 20 79 6f |.Nonethe|less, yo|
|00004870| 75 20 6d 61 79 20 73 70 | 6c 69 74 20 74 68 65 20 |u may sp|lit the |
|00004880| 6f 70 65 72 61 74 69 6f | 6e 73 2e 20 54 68 61 74 |operatio|ns. That|
|00004890| 20 69 73 3a 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 | is:.\be|gin{verb|
|000048a0| 61 74 69 6d 7d 0a 20 20 | 20 20 20 74 72 61 6e 73 |atim}. | trans|
|000048b0| 66 72 6d 20 2d 79 20 33 | 30 20 67 65 6f 6d 65 74 |frm -y 3|0 geomet|
|000048c0| 72 79 2e 64 61 74 20 7c | 20 74 72 61 6e 73 66 72 |ry.dat || transfr|
|000048d0| 6d 20 2d 78 20 33 30 20 | 2d 20 3e 20 74 67 65 6f |m -x 30 |- > tgeo|
|000048e0| 6d 65 74 72 79 2e 64 61 | 74 0a 5c 65 6e 64 7b 76 |metry.da|t.\end{v|
|000048f0| 65 72 62 61 74 69 6d 7d | 0a 6f 72 0a 5c 62 65 67 |erbatim}|.or.\beg|
|00004900| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0a 20 20 20 |in{verba|tim}. |
|00004910| 20 20 74 72 61 6e 73 66 | 72 6d 20 2d 78 20 33 30 | transf|rm -x 30|
|00004920| 20 67 65 6f 6d 65 74 72 | 79 2e 64 61 74 20 7c 20 | geometr|y.dat | |
|00004930| 74 72 61 6e 73 66 72 6d | 20 2d 79 20 33 30 20 2d |transfrm| -y 30 -|
|00004940| 20 3e 20 74 67 65 6f 6d | 65 74 72 79 2e 64 61 74 | > tgeom|etry.dat|
|00004950| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0a |.\end{ve|rbatim}.|
|00004960| 77 69 6c 6c 20 64 6f 20 | 65 78 61 63 74 6c 79 20 |will do |exactly |
|00004970| 77 68 61 74 20 6f 6e 65 | 20 65 78 70 65 63 74 73 |what one| expects|
|00004980| 2e 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 4c |...\subs|ection{L|
|00004990| 65 61 73 74 20 73 71 61 | 75 72 65 73 20 63 75 72 |east sqa|ures cur|
|000049a0| 76 65 20 66 69 74 74 69 | 6e 67 20 61 6e 64 20 70 |ve fitti|ng and p|
|000049b0| 72 6f 63 65 73 73 20 63 | 6f 6d 6d 75 6e 69 63 61 |rocess c|ommunica|
|000049c0| 74 69 6f 6e 20 28 6c 73 | 74 5c 5f 73 71 72 73 2e |tion (ls|t\_sqrs.|
|000049d0| 63 29 7d 0a 0a 54 68 69 | 73 20 65 78 61 6d 70 6c |c)}..Thi|s exampl|
|000049e0| 65 20 63 72 65 61 74 65 | 73 20 61 20 42 73 70 6c |e create|s a Bspl|
|000049f0| 69 6e 65 20 63 75 72 76 | 65 20 74 68 61 74 20 6c |ine curv|e that l|
|00004a00| 65 61 73 74 20 73 71 75 | 61 72 65 73 20 61 70 70 |east squ|ares app|
|00004a10| 72 6f 78 69 6d 61 74 65 | 73 0a 61 20 67 69 76 65 |roximate|s.a give|
|00004a20| 6e 20 73 65 74 20 6f 66 | 20 64 61 74 61 20 70 6f |n set of| data po|
|00004a30| 69 6e 74 73 2e 20 49 6e | 20 74 68 65 20 64 65 66 |ints. In| the def|
|00004a40| 61 75 6c 74 20 76 61 6c | 75 65 73 2c 20 61 20 71 |ault val|ues, a q|
|00004a50| 75 61 64 72 61 74 69 63 | 20 42 73 70 6c 69 6e 65 |uadratic| Bspline|
|00004a60| 0a 63 75 72 76 65 20 6f | 66 20 31 30 20 63 6f 6e |.curve o|f 10 con|
|00004a70| 74 72 6f 6c 20 70 6f 69 | 6e 74 73 20 6c 65 61 73 |trol poi|nts leas|
|00004a80| 74 20 73 71 61 75 72 65 | 73 20 61 70 70 72 6f 78 |t sqaure|s approx|
|00004a90| 69 6d 61 74 65 73 20 61 | 20 73 65 74 20 6f 66 20 |imates a| set of |
|00004aa0| 31 30 30 0a 74 68 72 65 | 65 20 64 69 6d 65 6e 73 |100.thre|e dimens|
|00004ab0| 69 6f 6e 61 6c 20 70 6f | 69 6e 74 73 2e 20 41 6c |ional po|ints. Al|
|00004ac0| 73 6f 20 73 68 6f 77 6e | 20 69 73 20 61 20 70 6f |so shown| is a po|
|00004ad0| 6c 79 6c 69 6e 65 20 6f | 66 20 74 68 65 20 6f 72 |lyline o|f the or|
|00004ae0| 69 67 69 6e 61 6c 0a 28 | 31 30 30 29 20 70 6f 69 |iginal.(|100) poi|
|00004af0| 6e 74 73 2e 20 41 72 62 | 69 74 72 61 72 79 20 6e |nts. Arb|itrary n|
|00004b00| 75 6d 62 65 72 20 6f 66 | 20 63 75 72 76 65 73 20 |umber of| curves |
|00004b10| 77 69 6c 6c 20 62 65 20 | 64 69 73 70 6c 61 79 65 |will be |displaye|
|00004b20| 64 20 65 76 65 72 79 2c | 20 6f 6e 65 0a 66 6f 72 |d every,| one.for|
|00004b30| 20 65 76 65 72 79 20 3c | 72 65 74 75 72 6e 3e 20 | every <|return> |
|00004b40| 6b 65 79 73 74 72 6f 6b | 65 20 75 6e 74 69 6c 20 |keystrok|e until |
|00004b50| 51 3c 72 65 74 75 72 6e | 3e 20 69 73 20 74 79 70 |Q<return|> is typ|
|00004b60| 65 64 2e 0a 0a 5c 69 6e | 70 75 74 7b 63 65 78 61 |ed...\in|put{cexa|
|00004b70| 6d 70 6c 65 2f 6c 73 74 | 5f 73 71 72 73 2e 74 65 |mple/lst|_sqrs.te|
|00004b80| 78 7d 0a 0a 25 25 25 25 | 25 25 25 25 25 25 25 25 |x}..%%%%|%%%%%%%%|
|00004b90| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004ba0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004bb0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004bc0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004bd0| 25 0a 5c 74 77 6f 63 6f | 6c 75 6d 6e 0a 5c 69 6e |%.\twoco|lumn.\in|
|00004be0| 70 75 74 7b 70 72 6f 67 | 5f 6d 61 6e 2e 69 6e 64 |put{prog|_man.ind|
|00004bf0| 7d 0a 0a 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |}..%%%%%|%%%%%%%%|
|00004c00| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004c10| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004c20| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004c30| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004c40| 0a 0a 5c 65 6e 64 7b 64 | 6f 63 75 6d 65 6e 74 7d |..\end{d|ocument}|
+--------+-------------------------+-------------------------+--------+--------+